Skip to content
Permalink
Browse files

[JENKINS-24399] Refine URL criteria to identify class dirs.

  • Loading branch information...
Andres Rodriguez
Andres Rodriguez committed Apr 8, 2016
1 parent ab0a6e1 commit 3c38ff1a33c5a860bf6fe36fe6a8394d33e524f3
@@ -96,7 +96,8 @@ static boolean isClassDirectoryURL(@Nonnull URL url) {
// If the URL is a file but does not exist we fallback to default behaviour
// as non existence will be dealt with when trying to use it.
}
return url.toExternalForm().endsWith("/");
String u = url.toExternalForm();
return u.endsWith("/") && !u.startsWith("jar:");
}

/**
@@ -44,7 +44,7 @@
} else {
assertRoundTrip("C:\\tmp\\x.jar", "file:/C:/tmp/x.jar");
}
assertEquals("jar:file:/tmp/x.jar!/subjar.jar", "jar:file:/tmp/x.jar!/subjar.jar");
assertRoundTrip("jar:file:/tmp/x.jar!/subjar.jar", "jar:file:/tmp/x.jar!/subjar.jar");
}

private static void assertRoundTrip(String path, String url) throws Exception {

0 comments on commit 3c38ff1

Please sign in to comment.
You can’t perform that action at this time.