--- a/jdk/src/share/classes/java/net/Socket.java Mon May 30 16:37:42 2011 +0100
+++ b/jdk/src/share/classes/java/net/Socket.java Mon May 30 23:36:10 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);