mirror of
https://github.com/corda/corda.git
synced 2025-06-18 15:18:16 +00:00
throw UnknownHostException if host is not found in InetAddress.getByName
This commit is contained in:
@ -291,6 +291,14 @@ public class Misc {
|
||||
expect(java.util.Arrays.equals
|
||||
(new byte[] { 0, 0, 0, 0 },
|
||||
java.net.InetAddress.getByName("0.0.0.0").getAddress()));
|
||||
|
||||
try {
|
||||
java.net.InetAddress.getByName
|
||||
("bs.thisdomaindoesntexistseriouslynoway");
|
||||
throw new AssertionError();
|
||||
} catch (java.net.UnknownHostException e) {
|
||||
// cool
|
||||
}
|
||||
}
|
||||
|
||||
protected class Protected { }
|
||||
|
Reference in New Issue
Block a user