From cfd7afc56e260bfe9feb1fed2c93e3a2797892d8 Mon Sep 17 00:00:00 2001
From: aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 7 Apr 2006 15:42:07 +0000
Subject: [PATCH] 2006-04-07  Andrew Haley  <aph@redhat.com>

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



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112754 138bc75d-0d04-0410-961f-82ee72b054a4
---
 libjava/ChangeLog                 | 5 +++++
 libjava/java/net/InetAddress.java | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 4944a6595e48..d52d8ab8c3f2 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -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:
diff --git a/libjava/java/net/InetAddress.java b/libjava/java/net/InetAddress.java
index 0a9831a4ab69..6ca72fe3e244 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
-- 
GitLab