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 isEmpty() rather than size() to verify if object is empty or not #667

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, one additional 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

See also: https://github.com/locationtech/udig-platform/pull/665 (Part 1)