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

Replace "Reflections" with Java ServiceLoader/SPI for SDK. #30

Closed
metasim opened this issue Mar 11, 2018 · 1 comment
Closed

Replace "Reflections" with Java ServiceLoader/SPI for SDK. #30

metasim opened this issue Mar 11, 2018 · 1 comment

Comments

@metasim
Copy link
Contributor

metasim commented Mar 11, 2018

IMHO, use of the Reflections library is a liability. It is partially or fully behind issues #11 and #26. I have personal experience with it in past projects where we found it to greatly affect startup time, and clash with instantiation sequencing via Google Guice. It also seems to have a problematic License, at least when used without forking and changing the license first.

I'd suggest replacing the use of Reflections with the standard Java SPI API, which is quite easy to use, has very low overhead, and doesn't suffer from ClassLoader issues. A simple "CatalogProvider" interface/trait would be all that was needed. It also paves the way for new features, such as #15.

Another option would be to have SDK users create a Google Guice module of custom operations, but that seems like more work for the SDK user, and more chance for an SDK users to muck with internals in an unexpected way (i.e. grabbing other resources via injection annotations).

@jaroslaw-osmanski
Copy link

Solved in current master

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

No branches or pull requests

2 participants