-
Notifications
You must be signed in to change notification settings - Fork 745
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
lombok causes an IllegalArgumentException in ReferenceEquality #447
Comments
The crash indicates that the suggest fix logic is seeing an AST node without an end position. |
I'm getting this with Lombok 1.16.20 and Error Prone 2.2.0 |
Still doesn't work with ErrorProne 2.3.1
leads to:
|
Still getting this with Lombok 1.18.6 and Error Prone 2.3.3 |
It seems like a fix has been proposed here: #1195 |
package t;
import lombok.Value;
import lombok.With;
@Value
public class I447 {
Long x;
@With String y;
} @With String y;
^
error-prone version: 2.5.1
BugPattern: ReferenceEquality
Stack Trace:
java.lang.IllegalArgumentException: invalid replacement: [94, -1) (Objects.equals(null, null))
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:459)
at com.google.errorprone.fixes.Replacement.create(Replacement.java:37) |
Please re-open this or file a new bug if you're still seeing issues with Lombok and Error Prone 2.13.0 when |
I tracked down this crash to a single
Wither
annotation from Lombok. Haven't checked the GitHub master branch nor any other versions though.Minimal example is at https://github.com/Ferada/errorprone-test with
mvn clean install
.Stacktrace:
The text was updated successfully, but these errors were encountered: