Skip to content

Commit 930dadf

Browse files
committed
use isEmpty() instead of length check
1 parent 68cd958 commit 930dadf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

opengrok-web/src/main/java/org/opengrok/web/PageConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,7 @@ public boolean isDir() {
12201220
}
12211221

12221222
private static String trailingSlash(String path) {
1223-
return path.length() == 0 || path.charAt(path.length() - 1) != PATH_SEPARATOR
1223+
return path.isEmpty() || path.charAt(path.length() - 1) != PATH_SEPARATOR
12241224
? PATH_SEPARATOR_STRING
12251225
: "";
12261226
}

0 commit comments

Comments
 (0)