< prev index next >

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

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

*** 1305,1315 **** * @param msg * a message to be used in case of error. */ static void checkMethodIdentifier(int version, final String name, final String msg) { ! if (name == null || name.length() == 0) { throw new IllegalArgumentException("Invalid " + msg + " (must not be null or empty)"); } if ((version & 0xFFFF) >= Opcodes.V1_5) { for (int i = 0; i < name.length(); ++i) { --- 1305,1315 ---- * @param msg * a message to be used in case of error. */ static void checkMethodIdentifier(int version, final String name, final String msg) { ! if (name == null || name.isEmpty()) { throw new IllegalArgumentException("Invalid " + msg + " (must not be null or empty)"); } if ((version & 0xFFFF) >= Opcodes.V1_5) { for (int i = 0; i < name.length(); ++i) {
*** 1345,1355 **** * the string to be checked. * @param msg * a message to be used in case of error. */ static void checkInternalName(final String name, final String msg) { ! if (name == null || name.length() == 0) { throw new IllegalArgumentException("Invalid " + msg + " (must not be null or empty)"); } if (name.charAt(0) == '[') { checkDesc(name, false); --- 1345,1355 ---- * the string to be checked. * @param msg * a message to be used in case of error. */ static void checkInternalName(final String name, final String msg) { ! if (name == null || name.isEmpty()) { throw new IllegalArgumentException("Invalid " + msg + " (must not be null or empty)"); } if (name.charAt(0) == '[') { checkDesc(name, false);
< prev index next >