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