--- a/src/java.base/unix/classes/java/io/UnixFileSystem.java Thu Dec 13 16:14:07 2018 +0100
+++ b/src/java.base/unix/classes/java/io/UnixFileSystem.java Thu Dec 13 15:31:05 2018 +0100
@@ -98,7 +98,7 @@
}
public int prefixLength(String pathname) {
- if (pathname.length() == 0) return 0;
+ if (pathname.isEmpty()) return 0;
return (pathname.charAt(0) == '/') ? 1 : 0;
}
@@ -249,7 +249,7 @@
public int getBooleanAttributes(File f) {
int rv = getBooleanAttributes0(f);
String name = f.getName();
- boolean hidden = (name.length() > 0) && (name.charAt(0) == '.');
+ boolean hidden = !name.isEmpty() && name.charAt(0) == '.';
return rv | (hidden ? BA_HIDDEN : 0);
}