summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-05-26 15:41:28 -0700
committerElliott Hughes <enh@google.com>2011-05-26 15:41:28 -0700
commitc61ad82613eb264cbf93e91519b0c061d11b3c2d (patch)
tree31e64a1275e504fe86c5ec2968ccec037a4861cb /luni
parent98879fb0ca920d752fce6177b6832293323e0944 (diff)
downloadlibcore-c61ad82613eb264cbf93e91519b0c061d11b3c2d.zip
libcore-c61ad82613eb264cbf93e91519b0c061d11b3c2d.tar.gz
libcore-c61ad82613eb264cbf93e91519b0c061d11b3c2d.tar.bz2
Match the RI's exact exception type.
Change-Id: Id64b8ff87198e31a93a92d19d542948bcbb74db0
Diffstat (limited to 'luni')
-rw-r--r--luni/src/main/java/java/net/Socket.java4
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();