walkmod-sonar-plugin icon indicating copy to clipboard operation
walkmod-sonar-plugin copied to clipboard

sonar:UseCollectionIsEmpty inverts condition

Open dalejunas opened this issue 8 years ago • 1 comments

UseCollectionIsEmpty violation fix inverts condition from if( list1.size() > 0 ){ ... }

to if( list1.isEmpty() ){ ... }

dalejunas avatar Jun 23 '17 12:06 dalejunas

There are many other cases, which may fail. Such as - if (0 < list.size) list.size >= 1 etc. Please refer to below link - https://github.com/walkmod/walkmod-core/issues/73

The change is attached in this link. Can someone review the changes, and place the fix. As, I am not able to create pull request ?

subisueno avatar Jul 25 '17 13:07 subisueno