< prev index next >

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

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

*** 994,1004 **** for (int cp = 0, endp;; cp = endp+1) { // Look for multiple case tags: endp = cstr.indexOf(',', cp); if (endp < 0) endp = cstrlen; String cstr1 = cstr.substring(cp, endp); ! if (cstr1.length() == 0) cstr1 = "empty"; // will fail parse int value0, value1; // Check for a case range (new in 1.6). int dash = findCaseDash(cstr1, 0); if (dash >= 0) { --- 994,1004 ---- for (int cp = 0, endp;; cp = endp+1) { // Look for multiple case tags: endp = cstr.indexOf(',', cp); if (endp < 0) endp = cstrlen; String cstr1 = cstr.substring(cp, endp); ! if (cstr1.isEmpty()) cstr1 = "empty"; // will fail parse int value0, value1; // Check for a case range (new in 1.6). int dash = findCaseDash(cstr1, 0); if (dash >= 0) {
< prev index next >