< prev index next >

src/java.base/windows/classes/sun/nio/fs/WindowsFileSystem.java

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

@@ -216,11 +216,11 @@
             path = first;
         } else {
             StringBuilder sb = new StringBuilder();
             sb.append(first);
             for (String segment: more) {
-                if (segment.length() > 0) {
+                if (!segment.isEmpty()) {
                     if (sb.length() > 0)
                         sb.append('\\');
                     sb.append(segment);
                 }
             }
< prev index next >