jdk/src/share/classes/java/net/Socket.java
changeset 3450 2f08a8bb9b83
parent 3442 02df74328591
child 5180 8161f879d704
equal deleted inserted replaced
3449:b13185c0de19 3450:2f08a8bb9b83
   116     public Socket(Proxy proxy) {
   116     public Socket(Proxy proxy) {
   117         // Create a copy of Proxy as a security measure
   117         // Create a copy of Proxy as a security measure
   118         if (proxy == null) {
   118         if (proxy == null) {
   119             throw new IllegalArgumentException("Invalid Proxy");
   119             throw new IllegalArgumentException("Invalid Proxy");
   120         }
   120         }
   121         Proxy p = proxy == Proxy.NO_PROXY ? Proxy.NO_PROXY : new Proxy(proxy.type(), proxy.address());
   121         Proxy p = proxy == Proxy.NO_PROXY ? Proxy.NO_PROXY : sun.net.ApplicationProxy.create(proxy);
   122         if (p.type() == Proxy.Type.SOCKS) {
   122         if (p.type() == Proxy.Type.SOCKS) {
   123             SecurityManager security = System.getSecurityManager();
   123             SecurityManager security = System.getSecurityManager();
   124             InetSocketAddress epoint = (InetSocketAddress) p.address();
   124             InetSocketAddress epoint = (InetSocketAddress) p.address();
   125             if (security != null) {
   125             if (security != null) {
   126                 if (epoint.isUnresolved())
   126                 if (epoint.isUnresolved())