diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 4944a6595e4..d52d8ab8c3f 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2006-04-07 Andrew Haley + + * java/net/InetAddress.java: Throw an UnknownHostException if + lookup fails. + 2006-04-05 Tom Tromey PR libgcj/26625: diff --git a/libjava/java/net/InetAddress.java b/libjava/java/net/InetAddress.java index 0a9831a4ab6..6ca72fe3e24 100644 --- a/libjava/java/net/InetAddress.java +++ b/libjava/java/net/InetAddress.java @@ -742,6 +742,9 @@ public class InetAddress implements Serializable } catch (Exception ex) { + UnknownHostException failure = new UnknownHostException(hostname); + failure.initCause(ex); + throw failure; } } else