-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #11092 - Allow MetaInfConfiguration parsing of java.class.path
to support globs
#12287
Changes from all commits
5df2dd9
85db80e
b4617fc
e4d3b97
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -169,9 +169,10 @@ public void findAndFilterContainerPaths(final WebAppContext context) throws Exce | |
String classPath = System.getProperty("java.class.path"); | ||
if (classPath != null) | ||
{ | ||
Stream.of(classPath.split(File.pathSeparator)) | ||
.map(resourceFactory::newResource) | ||
.filter(r -> uriPatternPredicate.test(r.getURI())) | ||
resourceFactory.split(classPath, File.pathSeparator) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Heh, technically we shouldn't fix ee8 and ee9 because they should be bug-for-bug compatible with jetty 10/11. But ok. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Jetty 10/11 we ignore globs here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. understood. |
||
.stream() | ||
.filter(Objects::nonNull) | ||
.filter(r -> uriPatternPredicate.test(URIUtil.unwrapContainer(r.getURI()))) | ||
.forEach(addContainerResource); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add another term to the glob string that is just a single jar file, to mimic a classpath that has both glob and individual jar files on it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test kind has that already, 2 non globs, and 1 glob.
Also the existing test
testSplitOnPipeWithGlob()
has the same.Do you want the non-glob to be specifically a jar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Followup, do you want the extra non-globs to be before or after the glob?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really mind the position of the jar, just so long as the test is a combination of dirs, a dir with glob and at least one explicit jar.