interface A {
/** javadoc */
void method();
}
abstract class B implements A {
// Rule: Java:S3038 Abstract methods should not be redundant
/** javadoc2 */
@Override
public abstract void method();
}
I can’t find any resources behind intentionally ignore javadoc overrides (which is a perfectly valid Java feature) for S3038 so I guess this is a false positive. Looking through the source code, S3038 seems to disregard any javadoc or comment completely.
Thank you for reporting!
Generally, this is not considered good practice, which is why the rule exists.
At the moment, we will not change the implementation for it.
TIL that JDK code is generally considered bad practice. Filtering specifically the search result for @Override abstract in popular open sources Java codebases will yield a considerable amount of “bad practices”.
For example, ConcurrentMap overrides Map#putIfAbsent to suppress the default implementation. Netty pretty much @Override and repeat all interfaces methods for clarity.
Thanks for the reply though, I disabled the rule. Now I understand why no actual high profile project pick SonarLint up, for these low quality rules must be very annoying to suppress.