< prev index next >

src/java.base/share/classes/jdk/internal/loader/URLClassPath.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()
Reviewed-by: jlaskey, prappo, lancea, dfuchs, redestad

*** 95,108 **** static { Properties props = GetPropertyAction.privilegedGetProperties(); JAVA_VERSION = props.getProperty("java.version"); DEBUG = (props.getProperty("sun.misc.URLClassPath.debug") != null); String p = props.getProperty("sun.misc.URLClassPath.disableJarChecking"); ! DISABLE_JAR_CHECKING = p != null ? p.equals("true") || p.equals("") : false; p = props.getProperty("jdk.net.URLClassPath.disableRestrictedPermissions"); ! DISABLE_ACC_CHECKING = p != null ? p.equals("true") || p.equals("") : false; // This property will be removed in a later release p = props.getProperty("jdk.net.URLClassPath.disableClassPathURLCheck", "true"); DISABLE_CP_URL_CHECK = p != null ? p.equals("true") || p.isEmpty() : false; --- 95,108 ---- static { Properties props = GetPropertyAction.privilegedGetProperties(); JAVA_VERSION = props.getProperty("java.version"); DEBUG = (props.getProperty("sun.misc.URLClassPath.debug") != null); String p = props.getProperty("sun.misc.URLClassPath.disableJarChecking"); ! DISABLE_JAR_CHECKING = p != null ? p.equals("true") || p.isEmpty() : false; p = props.getProperty("jdk.net.URLClassPath.disableRestrictedPermissions"); ! DISABLE_ACC_CHECKING = p != null ? p.equals("true") || p.isEmpty() : false; // This property will be removed in a later release p = props.getProperty("jdk.net.URLClassPath.disableClassPathURLCheck", "true"); DISABLE_CP_URL_CHECK = p != null ? p.equals("true") || p.isEmpty() : false;
< prev index next >