equal
deleted
inserted
replaced
27 import java.io.IOException; |
27 import java.io.IOException; |
28 import java.io.InputStream; |
28 import java.io.InputStream; |
29 import java.io.OutputStream; |
29 import java.io.OutputStream; |
30 import java.io.BufferedOutputStream; |
30 import java.io.BufferedOutputStream; |
31 import java.security.AccessController; |
31 import java.security.AccessController; |
|
32 import java.util.Iterator; |
32 |
33 |
33 import jdk.internal.util.StaticProperty; |
34 import jdk.internal.util.StaticProperty; |
34 import sun.net.SocksProxy; |
35 import sun.net.SocksProxy; |
35 import sun.net.spi.DefaultProxySelector; |
36 import sun.net.spi.DefaultProxySelector; |
36 import sun.net.www.ParseUtil; |
37 import sun.net.www.ParseUtil; |
325 assert false : e; |
326 assert false : e; |
326 uri = null; |
327 uri = null; |
327 } |
328 } |
328 Proxy p = null; |
329 Proxy p = null; |
329 IOException savedExc = null; |
330 IOException savedExc = null; |
330 java.util.Iterator<Proxy> iProxy = null; |
331 final Iterator<Proxy> iProxy; |
331 iProxy = sel.select(uri).iterator(); |
332 try { |
|
333 iProxy = sel.select(uri).iterator(); |
|
334 } catch (IllegalArgumentException iae) { |
|
335 throw new IOException("Failed to select a proxy", iae); |
|
336 } |
332 if (iProxy == null || !(iProxy.hasNext())) { |
337 if (iProxy == null || !(iProxy.hasNext())) { |
333 delegate.connect(epoint, remainingMillis(deadlineMillis)); |
338 delegate.connect(epoint, remainingMillis(deadlineMillis)); |
334 return; |
339 return; |
335 } |
340 } |
336 while (iProxy.hasNext()) { |
341 while (iProxy.hasNext()) { |