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

ServiceLoaders are now cached. #831

Merged
merged 1 commit into from
Sep 18, 2023
Merged

ServiceLoaders are now cached. #831

merged 1 commit into from
Sep 18, 2023

Conversation

bdemers
Copy link
Member

@bdemers bdemers commented Sep 15, 2023

The first ServiceLoaders found when looking up a class will be cached. This cache can be reset by calling Services.reload(), to help
facilitate testing or instances where a classpaths are dynamically changed at runtime.

Fixes: #752

Copy link
Contributor

@lhazlewood lhazlewood left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks! Just one comment/question.

impl/src/main/java/io/jsonwebtoken/impl/lang/Services.java Outdated Show resolved Hide resolved
The first ServiceLoaders found when looking up a class will be cached. This cache can be reset by calling `Services.reload()`, to help
facilitate testing or instances where a classpaths are dynamically changed at runtime.

Fixes: #752
Copy link
Contributor

@lhazlewood lhazlewood left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@bdemers bdemers merged commit 7805e08 into master Sep 18, 2023
18 checks passed
@bdemers bdemers deleted the service-loader-cache branch September 18, 2023 15:36
@lhazlewood lhazlewood added this to the 0.12.0 milestone Sep 27, 2023
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.

Cache java.util.ServiceLoader results
2 participants