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

Make javax.annotation-api dependency optional #52

Merged
merged 1 commit into from
Oct 26, 2020

Conversation

norrisjeremy
Copy link
Contributor

Use reflection to find javax.annotation.Priority, thus making the javax.annotation-api dependency optional.

@norrisjeremy norrisjeremy force-pushed the optional-annotation-api branch 2 times, most recently from b4a3f61 to bbb3f11 Compare October 26, 2020 13:18
@norrisjeremy norrisjeremy force-pushed the optional-annotation-api branch from bbb3f11 to 7d5a61d Compare October 26, 2020 17:40
@rbygrave
Copy link
Contributor

Yes, I like this change. I think we can improve it a little by moving the Class.forName("javax.annotation.Priority") earlier so I'll look to do that adjustment after merging this.

@norrisjeremy
Copy link
Contributor Author

Excellent, thanks! We make use of Guice in many internal projects and I'm interested in moving over to this as an alternative so that the injection is all handled at compile time. It's just that we don't make use of javax.annotation-api, so I was looking at how it could be left out.

@rbygrave rbygrave added this to the 1.2 milestone Oct 26, 2020
@rbygrave rbygrave merged commit c39e105 into avaje:master Oct 26, 2020
@norrisjeremy norrisjeremy deleted the optional-annotation-api branch October 28, 2020 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants