question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

lombok causes an IllegalArgumentException in ReferenceEquality

See original GitHub issue

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:

/home/olof/workspace/errorprone-test/src/main/java/com/example/Setting.java:10: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
    String key;
           ^
     Please report this at https://github.com/google/error-prone/issues/new and include the following:

     error-prone version: 2.0.11
     Stack Trace:
     java.lang.IllegalArgumentException: Invalid range: [163‥-1)
        at com.google.common.collect.Range.<init>(Range.java:352)
        at com.google.common.collect.Range.create(Range.java:146)
        at com.google.common.collect.Range.closedOpen(Range.java:182)
        at com.google.errorprone.fixes.Replacement.create(Replacement.java:38)
        at com.google.errorprone.fixes.SuggestedFix$ReplacementFix.getReplacement(SuggestedFix.java:365)
        at com.google.errorprone.fixes.SuggestedFix.getReplacements(SuggestedFix.java:94)
        at com.google.errorprone.fixes.AppliedFix$Applier.apply(AppliedFix.java:67)
        at com.google.errorprone.JavacErrorDescriptionListener$1.apply(JavacErrorDescriptionListener.java:51)
...

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
Raniz85commented, Mar 28, 2018

I’m getting this with Lombok 1.16.20 and Error Prone 2.2.0

0reactions
cushoncommented, Apr 14, 2022

Please re-open this or file a new bug if you’re still seeing issues with Lombok and Error Prone 2.13.0 when -XepDisableWarningsInGeneratedCode is enabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lombok causes an IllegalArgumentException in ReferenceEquality
I tracked down this crash to a single Wither annotation from Lombok. Haven't checked the GitHub master branch nor any other versions though....
Read more >
IllegalArgumentException at MetamodelImpl.java gradle build ...
I keep on getting a IllegalArgumentException at MetamodelImpl.java and I am not sure what is causing it. I pulled a brand new Spring...
Read more >
Adding activity stubs to a HashSet gives error even ... - Temporal
I get the following error when I try to run my workflow. Caused by: java.lang.IllegalArgumentException: Unexpected method: public native int ...
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
A pack call causes components to be realized. As they are being realized (that is, ... String parameter for reference equality using the...
Read more >
Bug Patterns - Error Prone
Comparison using reference equality instead of value equality. ... Casting a lambda to this @FunctionalInterface can cause a behavior change from casting to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found