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

Issue #11873 - Server resources are not found if the server is subclassed in a different package #11874

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

lachlan-roberts
Copy link
Contributor

closes #11873

@lachlan-roberts lachlan-roberts requested review from gregw and joakime June 4, 2024 03:48
return Stream.of(
new Server(),
new Server(){}
).map(Arguments::of);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this tests what you think it tests.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joakime this test fails before fix and now passes.

The idea is that it is trying to load jetty-dir.css, and it does getClass().getResource(name), internally this appends the package name as the resource does not start with /, and because the server is subclassed with the {} it is looking for /org/eclipse/jetty/server/subpackage/jetty-dir.css which does not exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the second argument is an anonymous subclass. got it.

@lachlan-roberts lachlan-roberts merged commit dc28714 into jetty-12.0.x Jun 4, 2024
10 of 11 checks passed
@lachlan-roberts lachlan-roberts deleted the jetty-12.0.x-11873-ServerResources branch June 4, 2024 13:38
@lachlan-roberts lachlan-roberts added the Sponsored This issue affects a user with a commercial support agreement label Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sponsored This issue affects a user with a commercial support agreement
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Server resources are not found if the server is subclassed in a different package
3 participants