changeset 4935:be57a1294c05

7142123: test/java/net/ProxySelector/B6737819.java failing on all platforms since Mac OS integration Reviewed-by: chegar
author michaelm
date Thu, 02 Feb 2012 09:03:49 -0800
parents c7d403da88ff
children d59e99cf611f
files src/share/classes/sun/net/spi/DefaultProxySelector.java
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/net/spi/DefaultProxySelector.java	Wed Feb 01 16:05:54 2012 -0800
+++ b/src/share/classes/sun/net/spi/DefaultProxySelector.java	Thu Feb 02 09:03:49 2012 -0800
@@ -242,9 +242,6 @@
                             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;
@@ -252,8 +249,10 @@
                                             nprop.hostsSource = null;
                                             nprop.hostsPool = null;
                                         }
-                                    } else {
+                                    } else if (nphosts.length() != 0) {
                                         // add the required default patterns
+                                        // but only if property no set. If it
+                                        // is empty, leave empty.
                                         nphosts += "|" + NonProxyInfo
                                                          .defStringVal;
                                     }