From c61ad82613eb264cbf93e91519b0c061d11b3c2d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 26 May 2011 15:41:28 -0700 Subject: Match the RI's exact exception type. Change-Id: Id64b8ff87198e31a93a92d19d542948bcbb74db0 --- luni/src/main/java/java/net/Socket.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/luni/src/main/java/java/net/Socket.java b/luni/src/main/java/java/net/Socket.java index f7788b5..9a2bd08 100644 --- a/luni/src/main/java/java/net/Socket.java +++ b/luni/src/main/java/java/net/Socket.java @@ -752,7 +752,7 @@ public class Socket { } InetSocketAddress inetAddr = (InetSocketAddress) localAddr; if ((addr = inetAddr.getAddress()) == null) { - throw new SocketException("Host is unresolved: " + inetAddr.getHostName()); + throw new UnknownHostException("Host is unresolved: " + inetAddr.getHostName()); } port = inetAddr.getPort(); } @@ -822,7 +822,7 @@ public class Socket { InetSocketAddress inetAddr = (InetSocketAddress) remoteAddr; InetAddress addr; if ((addr = inetAddr.getAddress()) == null) { - throw new SocketException("Host is unresolved: " + inetAddr.getHostName()); + throw new UnknownHostException("Host is unresolved: " + inetAddr.getHostName()); } int port = inetAddr.getPort(); -- cgit v1.1