< prev index next >

src/java.base/share/classes/sun/net/NetworkClient.java

Print this page

        

*** 67,77 **** static { final int vals[] = {0, 0}; final String encs[] = { null }; AccessController.doPrivileged( ! new PrivilegedAction<Void>() { public Void run() { vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 0).intValue(); vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 0).intValue(); encs[0] = System.getProperty("file.encoding", "ISO8859_1"); return null; --- 67,77 ---- static { final int vals[] = {0, 0}; final String encs[] = { null }; AccessController.doPrivileged( ! new PrivilegedAction<>() { public Void run() { vals[0] = Integer.getInteger("sun.net.client.defaultReadTimeout", 0).intValue(); vals[1] = Integer.getInteger("sun.net.client.defaultConnectTimeout", 0).intValue(); encs[0] = System.getProperty("file.encoding", "ISO8859_1"); return null;
*** 152,162 **** throws IOException, UnknownHostException { Socket s; if (proxy != null) { if (proxy.type() == Proxy.Type.SOCKS) { s = AccessController.doPrivileged( ! new PrivilegedAction<Socket>() { public Socket run() { return new Socket(proxy); }}); } else if (proxy.type() == Proxy.Type.DIRECT) { s = createSocket(); --- 152,162 ---- throws IOException, UnknownHostException { Socket s; if (proxy != null) { if (proxy.type() == Proxy.Type.SOCKS) { s = AccessController.doPrivileged( ! new PrivilegedAction<>() { public Socket run() { return new Socket(proxy); }}); } else if (proxy.type() == Proxy.Type.DIRECT) { s = createSocket();
*** 199,209 **** protected InetAddress getLocalAddress() throws IOException { if (serverSocket == null) throw new IOException("not connected"); return AccessController.doPrivileged( ! new PrivilegedAction<InetAddress>() { public InetAddress run() { return serverSocket.getLocalAddress(); } }); --- 199,209 ---- protected InetAddress getLocalAddress() throws IOException { if (serverSocket == null) throw new IOException("not connected"); return AccessController.doPrivileged( ! new PrivilegedAction<>() { public InetAddress run() { return serverSocket.getLocalAddress(); } });
< prev index next >