< prev index next >

src/java.base/share/classes/sun/net/TransferProtocolClient.java

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

@@ -74,11 +74,11 @@
             replyBuf.setLength(0);
             if (debug) {
                 System.out.print(response);
             }
 
-            if (response.length() == 0) {
+            if (response.isEmpty()) {
                 code = -1;
             } else {
                 try {
                     code = Integer.parseInt(response, 0, 3, 10);
                 } catch (NumberFormatException e) {
< prev index next >