Skip to content

ServiceLoaders are now cached.#831

Merged
bdemers merged 1 commit intomasterfrom
service-loader-cache
Sep 18, 2023
Merged

ServiceLoaders are now cached.#831
bdemers merged 1 commit intomasterfrom
service-loader-cache

Conversation

@bdemers
Copy link
Copy Markdown
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
Copy Markdown
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.

@bdemers bdemers force-pushed the service-loader-cache branch from d60fa21 to 0669b25 Compare September 15, 2023 20:09
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
@bdemers bdemers force-pushed the service-loader-cache branch from 0669b25 to ae1365a Compare September 15, 2023 20:11
Copy link
Copy Markdown
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
@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