]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
InetAddress.java: Throw an UnknownHostException if lookup fails.
authorAndrew Haley <aph@redhat.com>
Fri, 7 Apr 2006 15:42:07 +0000 (15:42 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Fri, 7 Apr 2006 15:42:07 +0000 (15:42 +0000)
2006-04-07  Andrew Haley  <aph@redhat.com>

        * java/net/InetAddress.java: Throw an UnknownHostException if
        lookup fails.

From-SVN: r112754

libjava/ChangeLog
libjava/java/net/InetAddress.java

index 4944a6595e48cbed2e89af8c1dc3a064f13ade5d..d52d8ab8c3f2da3239734369f406962d274c7084 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-07  Andrew Haley  <aph@redhat.com>
+
+       * java/net/InetAddress.java: Throw an UnknownHostException if
+       lookup fails.
+
 2006-04-05  Tom Tromey  <tromey@redhat.com>
 
        PR libgcj/26625:
index 0a9831a4ab69b540a28507fc1ff776f6b7316c48..6ca72fe3e244fcb059829b643d7c0f4952100b74 100644 (file)
@@ -742,6 +742,9 @@ public class InetAddress implements Serializable
          }
        catch (Exception ex)
          {
+           UnknownHostException failure = new UnknownHostException(hostname);
+           failure.initCause(ex);
+           throw failure;
          }
       }
     else