rewrite-static-analysis
rewrite-static-analysis copied to clipboard
MissingOverrideAnnotation adds wrong Override
What version of OpenRewrite are you using?
I am using
- Maven/Gradle plugin v5.7.1
What is the smallest, simplest way to reproduce the problem?
public interface Reproducer extends Cloneable {
Reproducer clone();
}
What did you expect to see?
No change. While Object has a clone method, the one above IS NOT the clone method of Object, but rather one defined in this interface only.
What did you see instead?
public interface Reproducer extends Cloneable {
@Override
Reproducer clone();
}
That doesn't compile anymore.
Are you interested in contributing a fix to OpenRewrite?
Not for this one. The necessary type compatibility checks are over my head probably.