Fix IP address parse error msg in IpAddressMatcher

There is no whitespace between error message and IP address value  `IpAddressMatcher#parseAddress()`
If IP value is wrong, then error text looks like `Failed to parse addressi.am.ip`.
There should be some separator between those two text tokens.

Also wrapped the address value with single quotes.
Will this add any confusion for the caller?
Or colon and `"Failed to parse address: $value` looks better?
This commit is contained in:
cyb3r4nt 2022-08-16 17:40:35 +03:00 committed by Josh Cummings
parent 2564f061e7
commit 1d555b62e3
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ public final class IpAddressMatcher implements RequestMatcher {
return InetAddress.getByName(address); return InetAddress.getByName(address);
} }
catch (UnknownHostException ex) { catch (UnknownHostException ex) {
throw new IllegalArgumentException("Failed to parse address" + address, ex); throw new IllegalArgumentException("Failed to parse address '" + address + "'", ex);
} }
} }