Skip to content

Commit

Permalink
[JENKINS-24399] Refine URL criteria to identify class dirs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andres Rodriguez committed Apr 8, 2016
1 parent ab0a6e1 commit 3c38ff1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -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:");
}

/**
Expand Down
Expand Up @@ -44,7 +44,7 @@ public class ClasspathEntryTest {
} 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 {
Expand Down

0 comments on commit 3c38ff1

Please sign in to comment.