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
[BUG] Lombok + eclipse + null-analysis: full compile OK, incremental incorrect #3133
Comments
This same problem exists with EqualsAndHashCode. I tried adding the appropriate bits to the Equals and CanEquals methods, but was surprised to find it did not seem to fix the issue. |
Figured out the issue on my end and created a PR with additional changes for this. |
@JohnPaulTaylorII Hmm, @Rawi01 just added a PR a day before yours which seems a bit simpler and is playing in the same space (namely, setting the Reopening for a moment, until this is resolved. |
My PR only handles copied annotations, the new one is about generated |
@rzwitserloot Sorry for the confusion. I had pulled @Rawi01's changes and realized that it didn't completely fix the bug, so I made a PR with additional changes. The two PRs complement each other and both are necessary to close this issue. |
[fixes #3133] Additional bits setting when creating type annotations
Describe the bug
When Eclipse performs an incremental build with null analysis enabled, it cannot see the annotations on Lombok generated code outside of the current file.
To Reproduce
lombokeclipse/LombokCheck.java
lombokeclipse/NullCheck.java
When cleaning the project (full build), everything is fine. Making a non-change to LombokCheck (add or remove a space for example), causes the call to setTheString to produce an error that the value must not be null. It appears that the compiler sees the @NonNullByDefault in NullCheck's source, and it sees the setTheString method just fine, but it does not see the @nullable annotation on the generated method.
Expected behavior
Eclipse performs null analysis correctly during incremental build.
Version info
Additional context
Attached an Eclipse project demonstrating the issue (lombok jar not included for size; add your own).
lombok-test.zip
The text was updated successfully, but these errors were encountered: