Fix the build

Check for null before trying to make InetAddresses.

Change-Id: I3228eea32eb455437dd76be2de56a913884f3f6e
This commit is contained in:
Robert Greenwalt
2011-01-26 15:01:16 -08:00
parent 2ec53df18d
commit 52ef39aff1

View File

@@ -162,8 +162,8 @@ public class NetworkUtils {
// TODO - do this for real, using a hidden method on InetAddress that aborts
// instead of doing dns step
if (!InetAddress.isNumeric(addrString)) {
throw new IllegalArgumentException("numericToInetAddress with non numeric: " +
addrString);
throw new IllegalArgumentException("numericToInetAddress with non numeric: '" +
addrString + "'");
}
try {
return InetAddress.getByName(addrString);