changeset 4701:d476c80173a3

7132699: [macosx] Proxy using for connection to localhost Reviewed-by: alanb
author michaelm
date Mon, 30 Jan 2012 13:47:44 +0000
parents 6f7d14fd7d8f
children 926b1d1014cf
files src/share/classes/sun/net/spi/DefaultProxySelector.java
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/spi/DefaultProxySelector.java	Mon Jan 30 13:43:46 2012 +0000
+++ b/src/share/classes/sun/net/spi/DefaultProxySelector.java	Mon Jan 30 13:47:44 2012 +0000
@@ -242,6 +242,9 @@
                             if (nprop != null) {
                                 nphosts = NetProperties.get(nprop.property);
                                 synchronized (nprop) {
+                                    if (nphosts != null && nphosts.length()==0){
+                                        nphosts = null;
+                                    }
                                     if (nphosts == null) {
                                         if (nprop.defaultVal != null) {
                                             nphosts = nprop.defaultVal;
@@ -249,6 +252,10 @@
                                             nprop.hostsSource = null;
                                             nprop.hostsPool = null;
                                         }
+                                    } else {
+                                        // add the required default patterns
+                                        nphosts += "|" + NonProxyInfo
+                                                         .defStringVal;
                                     }
                                     if (nphosts != null) {
                                         if (!nphosts.equals(nprop.hostsSource)) {