locationtech / udig-platform

uDig parent project containing all core components. More plugins can be found in community repos: http://github.com/uDig-Community
http://udig.refractions.net
190 stars 133 forks source link

Use '!obj.isEmpty()' rather than 'obj.size() > 0' #665

Closed sschulz92 closed 2 years ago

sschulz92 commented 2 years ago

With this Pull-Request I want to solve a code-smell in a subset of modules, a second (maybe a third) Pull-Request will be required. The change is about obj.size() > 0 which should look like this: !obj.isEmpty() according to SonarQube.

SonarQube rule is named:

Collection.isEmpty() should be used to test for emptiness