diff --git a/jdk/make/sun/net/FILES_java.gmk b/jdk/make/sun/net/FILES_java.gmk index 23c94b42ab0..576159c4799 100644 --- a/jdk/make/sun/net/FILES_java.gmk +++ b/jdk/make/sun/net/FILES_java.gmk @@ -33,6 +33,7 @@ FILES_java = \ sun/net/ProgressEvent.java \ sun/net/ProgressListener.java \ sun/net/ProgressMeteringPolicy.java \ + sun/net/SocksProxy.java \ sun/net/TelnetInputStream.java \ sun/net/TelnetOutputStream.java \ sun/net/TelnetProtocolException.java \ diff --git a/jdk/src/share/classes/java/io/PrintStream.java b/jdk/src/share/classes/java/io/PrintStream.java index 87d425bfeb0..9ed3ff6f910 100644 --- a/jdk/src/share/classes/java/io/PrintStream.java +++ b/jdk/src/share/classes/java/io/PrintStream.java @@ -70,7 +70,7 @@ public class PrintStream extends FilterOutputStream private OutputStreamWriter charOut; /** - * nonNull is explicitly delcared here so as not to create an extra + * nonNull is explicitly declared here so as not to create an extra * dependency on java.util.Objects.nonNull. PrintStream is loaded * early during system initialization. */ diff --git a/jdk/src/share/classes/java/net/SocksSocketImpl.java b/jdk/src/share/classes/java/net/SocksSocketImpl.java index 99161753cda..4fb61efe633 100644 --- a/jdk/src/share/classes/java/net/SocksSocketImpl.java +++ b/jdk/src/share/classes/java/net/SocksSocketImpl.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -29,6 +29,7 @@ import java.io.OutputStream; import java.io.BufferedOutputStream; import java.security.AccessController; import java.security.PrivilegedExceptionAction; +import sun.net.SocksProxy; import sun.net.www.ParseUtil; /* import org.ietf.jgss.*; */ @@ -397,6 +398,11 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts { // Use getHostString() to avoid reverse lookups server = ((InetSocketAddress) p.address()).getHostString(); serverPort = ((InetSocketAddress) p.address()).getPort(); + if (p instanceof SocksProxy) { + if (((SocksProxy)p).protocolVersion() == 4) { + useV4 = true; + } + } // Connects to the SOCKS server try { @@ -700,6 +706,11 @@ class SocksSocketImpl extends PlainSocketImpl implements SocksConsts { // Use getHostString() to avoid reverse lookups server = ((InetSocketAddress) p.address()).getHostString(); serverPort = ((InetSocketAddress) p.address()).getPort(); + if (p instanceof SocksProxy) { + if (((SocksProxy)p).protocolVersion() == 4) { + useV4 = true; + } + } // Connects to the SOCKS server try { diff --git a/jdk/src/share/classes/java/net/doc-files/net-properties.html b/jdk/src/share/classes/java/net/doc-files/net-properties.html index fffdfebc431..ae39fec8e8b 100644 --- a/jdk/src/share/classes/java/net/doc-files/net-properties.html +++ b/jdk/src/share/classes/java/net/doc-files/net-properties.html @@ -127,10 +127,15 @@ of proxies.

are specified. If SOCKS is supported by a Java SE implementation, the following properties will be used: