Skip to content

Conversation

@mcculls
Copy link
Collaborator

@mcculls mcculls commented Oct 7, 2025

For example, filtering by class-loader sub-graphs - this will be useful in environments such as OSGi

For example, filtering by class-loader sub-graphs.
@mcculls mcculls requested a review from a team as a code owner October 7, 2025 09:52
@mcculls mcculls requested a review from ygree October 7, 2025 09:52
@mcculls mcculls added the enhancement New feature or request label Oct 7, 2025
@mcculls mcculls requested review from cecile75 and removed request for ygree October 7, 2025 09:53
* @see ClassLoaderIndex#getClassLoaderKeyId(ClassLoader)
*/
@SuppressWarnings("unchecked")
public T find(CharSequence className, IntPredicate classLoaderKeyFilter) {
Copy link
Collaborator Author

@mcculls mcculls Oct 7, 2025

Choose a reason for hiding this comment

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

Note this is structurally very similar to the other find method, but I don't want to deduplicate the code for performance reasons. The other method uses a fast primitive operator inside the loop, whereas this involves a method call.

Copy link

@bric3 bric3 Oct 8, 2025

Choose a reason for hiding this comment

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

Might be worth leaving a text comment here, for anyone opening this source file, and not having the PR context :)

@mcculls mcculls merged commit 9dfd920 into main Oct 7, 2025
5 checks passed
@mcculls mcculls deleted the mcculls/smart-class-loader-key-filtering branch October 7, 2025 13:26
@github-actions github-actions bot added this to the 0.0.2 milestone Oct 7, 2025
@bric3
Copy link

bric3 commented Oct 8, 2025

For example, filtering by class-loader sub-graphs - this will be useful in environments such as OSGi

For my own understanding. How does this work with classloader subgraphs ?

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants