Skip to content
This repository was archived by the owner on Sep 14, 2026. It is now read-only.
This repository was archived by the owner on Sep 14, 2026. It is now read-only.

UseCollectionIsEmpty is not working as expected : changing the implementation logic : Cloned #74

Description

@subisueno

It is not working for below logic -
if(0 < myList.size()){ System.out.println("My List is not Empty."); }
I personally feel, the code can be made simpler. I saw the code logic is too complex and that is why it is really difficult to maintain this code working in so many test-cases.

That is why I tried to make the code simpler - there are 2 main cases -

isEmpty
!isEmpty
Now, If we write the code such a way that a simple change would include / exclude (while fixing any bug) a particular condition from deriving any of the above. So, a Set data-structure would help us to hold the set of conditions. If anyone of them is working the entire set of conditions should be working.
walkmod/walkmod-sonar-plugin#12

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions