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
adangel
changed the title
[java]UseCollectionIsEmpty can not detect the case foo.bar().size()
[java] UseCollectionIsEmpty can not detect the case foo.bar().size()
Jan 7, 2023
Affects PMD Version:
6.22.0
Rule:
UseCollectionIsEmpty
Description:
UseCollectionIsEmpty can not detect the case
foo.bar().size()
.AST analyse result of the code sample:
In the case
vr.getMembers().size()
, PrimaryPrefix isvr.getMembers
, may cause error in comparing whether PrimaryPrefix is collectionCode Sample demonstrating the issue:
Expected outcome:
false-negative
Running PMD through:
CLI
The text was updated successfully, but these errors were encountered: