< prev index next >

src/java.base/share/classes/jdk/internal/org/objectweb/asm/TypePath.java

Print this page
rev 52979 : 8215281: Use String.isEmpty() when applicable in java.base
Reviewed-by: TBD

@@ -145,11 +145,11 @@
       * @param typePath a type path in string form, in the format used by {@link #toString()}. May be
       *     {@literal null} or empty.
       * @return the corresponding TypePath object, or {@literal null} if the path is empty.
       */
     public static TypePath fromString(final String typePath) {
-        if (typePath == null || typePath.length() == 0) {
+        if (typePath == null || typePath.isEmpty()) {
             return null;
         }
         int typePathLength = typePath.length();
         ByteVector output = new ByteVector(typePathLength);
         output.putByte(0);
< prev index next >