jdk/src/share/classes/java/net/Socket.java
changeset 9550 c3a275ce56d3
parent 9544 89c6ba8bb6c7
child 9775 1b128726e887
--- 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);