< prev index next >

src/java.base/share/classes/java/util/jar/Pack200.java

Print this page
rev 52881 : 8214971: Replace use of string.equals("") with isEmpty()

@@ -702,11 +702,11 @@
         try {
             Class<?> impl = (PACK_PROVIDER.equals(prop))? packerImpl: unpackerImpl;
             if (impl == null) {
                 // The first time, we must decide which class to use.
                 implName = GetPropertyAction.privilegedGetProperty(prop,"");
-                if (implName != null && !implName.equals(""))
+                if (implName != null && !implName.isEmpty())
                     impl = Class.forName(implName);
                 else if (PACK_PROVIDER.equals(prop))
                     impl = com.sun.java.util.jar.pack.PackerImpl.class;
                 else
                     impl = com.sun.java.util.jar.pack.UnpackerImpl.class;
< prev index next >