< prev index next >

src/java.base/share/classes/com/sun/java/util/jar/pack/ConstantPool.java

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

@@ -1364,11 +1364,11 @@
                 // It must be a homogeneous Entry set.
                 assert(cpMap[i].tag == tag);
             }
             if (tag == CONSTANT_Utf8) {
                 // Special case:  First Utf8 must always be empty string.
-                assert(cpMap.length == 0 || cpMap[0].stringValue().equals(""));
+                assert(cpMap.length == 0 || cpMap[0].stringValue().isEmpty());
             }
             indexByTag[tag] = ix;
             // decache indexes derived from this one:
             untypedFirstIndexByTag = null;
             indexByTagGroup = null;
< prev index next >