Skip to content

Conversation

@michael-simons
Copy link
Contributor

@michael-simons michael-simons commented Nov 8, 2024

Fixes #891 (Sorry, typo and tagged the wrong issue)

…nt fields to accomdate Quarkus 3.15.x and earlier and 3.16.x and later.

Fixes classgraph#391.
if(elements == null) {
elements = new ArrayList<>();
for(String fieldName : new String[] {"normalPriorityElements", "lesserPriorityElements"}) {
elements.addAll((Collection<Object>) classpathOrder.reflectionUtils.getFieldVal(false,
Copy link
Member

Choose a reason for hiding this comment

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

Please check if getFieldVal returns null before calling addAll here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good idea :)

@lukehutch
Copy link
Member

Other than the one change I requested, looks good -- thank you, @michael-simons!

@michael-simons
Copy link
Contributor Author

Thanks, @lukehutch, change is done.

@lukehutch
Copy link
Member

Excellent, thank you @michael-simons! Merging.

You said in the issue that you would write the full URL handler to handle in-memory classes. I assume that will build on this PR. I will wait until that is available to push out a release. Thanks for volunteering to do that work too.

@lukehutch lukehutch merged commit 9e18854 into classgraph:latest Nov 9, 2024
@michael-simons
Copy link
Contributor Author

To help OGM users I’d love to see this go out first (also less pressure on me to get this right) if that’s ok with you.

@michael-simons michael-simons deleted the issue/391 branch November 9, 2024 16:16
michael-simons added a commit to michael-simons/classgraph that referenced this pull request Nov 11, 2024
This is a follow up on issue classgraph#891 and the preceding PR classgraph#893 and brings two changes:

* The `QuarkusClassLoaderHandler` is a bit more explicit now about how the elements returned from the class loader are treated
* The `FastPathResolver` can be simplified using only one pattern
michael-simons added a commit to michael-simons/classgraph that referenced this pull request Nov 11, 2024
This is a follow up on issue classgraph#891 and the preceding PR classgraph#893 and brings two changes:

* The `QuarkusClassLoaderHandler` is a bit more explicit now about how the elements returned from the class loader are treated
* The `FastPathResolver` can be simplified using only one pattern
@lukehutch
Copy link
Member

@michael-simons Released in 4.8.178 (and I'm releasing another unrelated PR that I forgot about in 4.8.179).

PS Narcissus still has build issues (I opened a new issue there), but I decided to just push out ClassGraph without those fixes, because you need it quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Webjars broken with Quarkus 3.16 due to an exception in Classgraph

2 participants