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:
Hi, we are doing research in testing static analyzer. Our approach found a false negative about the rule ConstructorCallsOverridableMethod.
In the first example below, PMD should have reported a warning at line 4, but not. However, PMD can report the warning at line 3 in the second example. Hence, I think this is a false negative.
First example (False negative)
publicclassFoo {
finalbooleantag = true;
publicFoo() {
bar(tag); // should report a warning at this line
}
publicvoidbar(booleanb) {}
}
Second example (Can be detected)
publicclassFoo {
publicFoo() {
bar(true); // should report a warning at this line
}
publicvoidbar(booleanb) {}
}
Expected outcome:
PMD should report a violation at line 4, but doesn't. This is a false-negative.
Running PMD through:[CLI]
The text was updated successfully, but these errors were encountered:
adangel
changed the title
ConstructorCallsOverridableMethod should consider constructor with constants
[java] ConstructorCallsOverridableMethod should consider constructor with constants
Aug 24, 2022
adangel
changed the title
[java] ConstructorCallsOverridableMethod should consider constructor with constants
[java] ConstructorCallsOverridableMethod should consider method calls with var access
Aug 24, 2022
Affects PMD Version:6.47.0
Rule:ConstructorCallsOverridableMethod
Please provide the rule name and a link to the rule documentation:
https://pmd.sourceforge.io/pmd-6.48.0/pmd_rules_java_errorprone.html#constructorcallsoverridablemethod
Description:
Hi, we are doing research in testing static analyzer. Our approach found a false negative about the rule ConstructorCallsOverridableMethod.
In the first example below, PMD should have reported a warning at line 4, but not. However, PMD can report the warning at line 3 in the second example. Hence, I think this is a false negative.
First example (False negative)
Second example (Can be detected)
Expected outcome:
PMD should report a violation at line 4, but doesn't. This is a false-negative.
Running PMD through: [CLI]
The text was updated successfully, but these errors were encountered: