-
Notifications
You must be signed in to change notification settings - Fork 134
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
Fix ImmutablesBuilderMissingInitialization on Java 15 when immutables isn't on the classpath #1507
Conversation
Generate changelog in
|
Curious why this only fails on java 15. Do you have a stacktrace you can share here? |
The stack trace that shows up in circle is
but that's actually an exception while handling the other exception (I've not figured that one out but it happens in all JDKs under the right conditions and is either a JDK or Errorprone issue). The actual root cause exception is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing the context. I'm also not sure why this is j15 specific but happy to get the fix out!
Released 3.40.1 |
Before this PR
The ImmutablesBuilderMissingInitialization check consistently fails with java 15 (but not <=14) if the immutables annotation jar isn't available on the classpath, such as in tests.
After this PR
==COMMIT_MSG==
Fix ImmutablesBuilderMissingInitialization in java15
==COMMIT_MSG==
This fixes the issue because it now accesses the attributes directly from the AST rather than trying to reflectively instantiate the annotation to access the attributes. I'm not sure why this is java 15 specific...