diff options
author | Elliott Hughes <enh@google.com> | 2011-05-26 15:59:22 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-05-26 15:59:22 -0700 |
commit | fefa79414d785f556bd887e4e035f49b2be5e38f (patch) | |
tree | a598bad379d27721e2e3b64502950e71ff04a1a0 /luni | |
parent | 2d99ef561304174b8ae01a0a68d5b96d5edb9f10 (diff) | |
parent | c61ad82613eb264cbf93e91519b0c061d11b3c2d (diff) | |
download | libcore-fefa79414d785f556bd887e4e035f49b2be5e38f.zip libcore-fefa79414d785f556bd887e4e035f49b2be5e38f.tar.gz libcore-fefa79414d785f556bd887e4e035f49b2be5e38f.tar.bz2 |
Merge "Match the RI's exact exception type." into dalvik-dev
Diffstat (limited to 'luni')
-rw-r--r-- | luni/src/main/java/java/net/Socket.java | 4 |
1 files 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(); |