You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
False positive for package-private method triggered by class extended in another package.
A package-private method cannot
be directly overridden by a method in a different package JLS 8.4.8.1.
The method in the derived class is not the inherited method and thus the rule should not flag it as needing an @OverRide annotation. Package-private methods can only be overridden by classes defined in the same package as the base class.
oowekyala
changed the title
[Java] False positive triggered by package-private method overwritten in another package by extending class.
[java] MissingOverride false-positive triggered by package-private method overwritten in another package by extending class.
Nov 10, 2020
Affects PMD Version:
6.16.0, 6.17.0
Rule:
MissingOverride
Description:
False positive for package-private method triggered by class extended in another package.
A package-private method cannot
be directly overridden by a method in a different package JLS 8.4.8.1.
The method in the derived class is not the inherited method and thus the rule should not flag it as needing an @OverRide annotation. Package-private methods can only be overridden by classes defined in the same package as the base class.
Code Sample demonstrating the issue:
Running PMD through: *[CLI | Ant] *
The text was updated successfully, but these errors were encountered: