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

Use javax.annotation.processing.Generated on newer versions of java #6

Closed
Sineaggi opened this issue May 14, 2022 · 2 comments · Fixed by #7
Closed

Use javax.annotation.processing.Generated on newer versions of java #6

Sineaggi opened this issue May 14, 2022 · 2 comments · Fixed by #7

Comments

@Sineaggi
Copy link
Contributor

The new j.a.p.Generated annotation has been available since java 9, and should be used instead of the old j.a.Generated annotation.

Under java 17, I see this exception

Caused by: java.lang.ClassNotFoundException: javax.annotation.Generated

Currently this can be worked around by adding the "javax.annotation:javax.annotation-api:1.3.2" dependency explicitly.

@skinny85
Copy link
Owner

Thanks for opening the issue @Sineaggi!

The only thing that gives me pause about switching to javax.annotation.processing.Generated is that it's only available since Java 9, while currently Jilt can be used from Java 1.6 onwards.

Is it very inconvenient to add the dependency on javax.annotation:javax.annotation-api:1.3.2? Is it worth it to make Jilt only be usable from Java 9 onwards? I'm mostly worried about dropping support for Java 8, which I know is very popular.

@Sineaggi
Copy link
Contributor Author

Is the pr I made acceptable? If you're compiling under java 9 (and above) it'll choose the new annotation. Under 9, it'll fall back to the older annotation.

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 a pull request may close this issue.

2 participants