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

Lombok false positive: MissingOverride for "@EqualsAndHashCode(callSuper = true)" when extending base class #1481

Closed
ksilz opened this issue Jan 17, 2020 · 1 comment
Labels

Comments

@ksilz
Copy link

ksilz commented Jan 17, 2020

Description of the problem / feature request:

I'm compiling my Java 11 Spring Boot program with Error Prone and get a false positive on MissingOverride in a class that has the Lombok annotation @EqualsAndHashCode(callSuper = true) and extends another class.

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

I reproduced the error in a test case repo.

[...]/src/main/java/com/betterprojectsfaster/test/errorprone/lombokErrorProne/issues/missingoverride/IssueShowCase.java:8: warning: [MissingOverride] canEqual overrides method in Base; expected @Override
@EqualsAndHashCode(callSuper = true)
^
    (see https://errorprone.info/bugpattern/MissingOverride)
    Did you mean '@Override @EqualsAndHashCode(callSuper = true)'?

What version of Error Prone are you using?

Here's my my environment:

  • macOS Catalina 10.15.2
  • Gradle 5.6.4
  • AdoptOpenJDK Eclipse OpenJ9 11.0.5
  • Lombok 1.18.10
  • Error Prone Gradle plug-in 1.1.1
  • Error Prone 2.3.4

Have you found anything relevant by searching the web?

Didn't find anything relevant in the mailing list. Here are related Lombox issues:

  • #1479: Lombok - MultiVariableDeclaration: IllegalArgumentException "Start [449] should not be after end [-1]" (Preconditions.java:300)
  • #1430:
    IllegalArgumentException from AlmostJavadoc pattern on project using lombok
@cushon cushon added the lombok label May 19, 2020
fmendezh added a commit to gbif/vocabulary that referenced this issue Mar 31, 2021
…ease that doesn't use plexus which creates conflict with errorprone and lombok google/error-prone#1481
@cushon
Copy link
Collaborator

cushon commented 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.

@cushon cushon closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants