< prev index next >

src/java.base/share/classes/sun/net/www/HeaderParser.java

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

@@ -224,11 +224,11 @@
         sb.append("{size=").append(asize).append(" nkeys=").append(nkeys)
                 .append(' ');
         for (int i=0; k.hasNext(); i++) {
             String key = k.next();
             String val = findValue (i);
-            if (val != null && "".equals (val)) {
+            if (val != null && val.isEmpty()) {
                 val = null;
             }
             sb.append(" {").append(key).append(val == null ? "" : "," + val)
                     .append('}');
             if (k.hasNext()) {
< prev index next >