< prev index next >

src/java.base/share/classes/sun/net/spi/DefaultProxySelector.java

Print this page
rev 51919 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: dfuchs, alanb

*** 238,248 **** */ phost = NetProperties.get(props[i][j]+"Host"); if (phost != null && phost.length() != 0) break; } ! if (phost == null || phost.length() == 0) { /** * No system property defined for that * protocol. Let's check System Proxy * settings (Gnome, MacOsX & Windows) if * we were instructed to. --- 238,248 ---- */ phost = NetProperties.get(props[i][j]+"Host"); if (phost != null && phost.length() != 0) break; } ! if (phost == null || phost.isEmpty()) { /** * No system property defined for that * protocol. Let's check System Proxy * settings (Gnome, MacOsX & Windows) if * we were instructed to.
*** 267,277 **** nphosts = nprop.defaultVal; } else { nprop.hostsSource = null; nprop.pattern = null; } ! } 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; --- 267,277 ---- nphosts = nprop.defaultVal; } else { nprop.hostsSource = null; nprop.pattern = null; } ! } else if (!nphosts.isEmpty()) { // add the required default patterns // but only if property no set. If it // is empty, leave empty. nphosts += "|" + NonProxyInfo .defStringVal;
< prev index next >