Skip to content
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

jetty-12.0.x WebappClassloader addJars(Resource) incorrectly transforms into a CombinedResource #8980

Closed
janbartel opened this issue Nov 30, 2022 · 1 comment · Fixed by #8982 or #9090
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@janbartel
Copy link
Contributor

jetty-12.0.x

The WebAppClassloader.addJars(Resource) method looks for all jar files inside the Resource (that is a directory), turning each of the jars into a String and calling addClassPath(String). That method is expecting either a single jar, or a comma separated list of jars. There are 2 bugs in this method:

  1. if even a single jar is passed as the argument, a List<URI> is produced and passed to the ResourceFactory, which turns it into a CombinedResource. It should be just a single Resource.
  2. if multiple jars are passed as the argument, it is incorrect to transform them into a CombinedResource. They are simply a list of different jar Resources, they are not a CombinedResource (which is a combination of resources, all of which are directories).
@janbartel janbartel added the Bug For general bugs on Jetty side label Nov 30, 2022
@janbartel janbartel moved this to To do in Jetty 12.0.ALPHAS Nov 30, 2022
gregw added a commit that referenced this issue Nov 30, 2022
List of resources is a list of resources, not a combined resource.
@gregw gregw linked a pull request Nov 30, 2022 that will close this issue
gregw added a commit that referenced this issue Dec 1, 2022
List of resources is a list of resources, not a combined resource.
@janbartel
Copy link
Contributor Author

Fixed.

Repository owner moved this from To do to Done in Jetty 12.0.ALPHAS Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
2 participants