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 #11510 - Prevent NPE in ClassMatcher.match() #11511

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

joakime
Copy link
Contributor

@joakime joakime commented Mar 12, 2024

Fixes #11510

@joakime joakime requested a review from gregw March 12, 2024 22:00
@joakime joakime self-assigned this Mar 12, 2024
@joakime joakime added the Bug For general bugs on Jetty side label Mar 12, 2024
Copy link
Contributor

@gregw gregw left a comment

Choose a reason for hiding this comment

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

I'm not opposed to making this change, but I'd like to see some more info about why it is happening. It looks like a webapp is being deployed and we are looking at a class that has a URL, but no URI?

I think we need to establish that the URI is correctly null... and then put these guards in.

@joakime
Copy link
Contributor Author

joakime commented Mar 12, 2024

A normal run wouldn't trigger this, as there are already null checks before this code is even attempted.
However, if you are debugging, like I was, then this triggers as the debug window doing various toString that eventually reach this code.

@joakime joakime merged commit d07d13f into jetty-12.0.x Mar 13, 2024
8 checks passed
@joakime joakime deleted the fix/12.0.x/classmatcher-match-npe branch March 13, 2024 18:47
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
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

Occasional NPE in ClassMatcher.match() from WebAppClassLoader.loadClass() usage
2 participants