[java] UseNotifyAllInsteadOfNotify falsely detect a special case with argument: foo.notify(bar) #2577
Labels
a:false-positive
PMD flags a piece of code that is not problematic
Milestone
Affects PMD Version:
6.22.0
Rule:
UseNotifyAllInsteadOfNotify
Description:
UseNotifyAllInsteadOfNotify falsely detect a special case with argument:
foo.notify(bar)
This rule is implemented through xpath search:
AST analyse result of the code sample:
In the case
getInjector().notify(getCanonicalName(), e.getMessage(), e)
, the fifth line of the AST analysis result is<PrimarySuffix ArgumentCount='0'
, which causes detection even whennotify()
with argument.Code Sample demonstrating the issue:
Expected outcome:
false-positive
Running PMD through:
CLI
The text was updated successfully, but these errors were encountered: