equal
deleted
inserted
replaced
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()) |