Skip to content

Commit 3c3fabe

Browse files
committed
Remove unnecessary code
canRead() is true so the directory exists. If the directory exists File.toURI().toURL() will always end in a trailing "/".
1 parent f5af457 commit 3c3fabe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/org/apache/catalina/startup/ClassLoaderFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static ClassLoader createClassLoader(File unpacked[],
8989
if (!file.canRead()) {
9090
continue;
9191
}
92-
file = new File(file.getCanonicalPath() + File.separator);
92+
file = new File(file.getCanonicalPath());
9393
URL url = file.toURI().toURL();
9494
if (log.isDebugEnabled()) {
9595
log.debug(" Including directory " + url);

0 commit comments

Comments
 (0)