--- a/jdk/src/share/classes/java/net/Socket.java Sun May 01 14:22:32 2011 +0800
+++ b/jdk/src/share/classes/java/net/Socket.java Mon May 02 11:02:58 2011 +0100
@@ -127,11 +127,12 @@
}
if (security != null) {
if (epoint.isUnresolved())
- security.checkConnect(epoint.getHostName(),
- epoint.getPort());
+ epoint = new InetSocketAddress(epoint.getHostName(), epoint.getPort());
+ if (epoint.isUnresolved())
+ security.checkConnect(epoint.getHostName(), epoint.getPort());
else
security.checkConnect(epoint.getAddress().getHostAddress(),
- epoint.getPort());
+ epoint.getPort());
}
impl = new SocksSocketImpl(p);
impl.setSocket(this);