openhab-core/bundles/org.openhab.core.compat1x/src
Wouter Born be69d2254e Use !isEmpty() instead of "size() > 0" or "size() != 0" (#1155)
* Use !isEmpty() instead of "size() > 0" or "size() != 0"

!isEmpty() expresses the intent more clearly and is therefore preferred.
Counting the number of elements can also be an expensive operation e.g. when using linked lists.

Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de>
Signed-off-by: Wouter Born <github@maindrain.net>
2019-10-21 09:00:52 +02:00
..
main/java/org/openhab Use !isEmpty() instead of "size() > 0" or "size() != 0" (#1155) 2019-10-21 09:00:52 +02:00
test/java/org/openhab/core/compat1x/internal Move compat1x unit tests (#1080) 2019-10-03 20:00:57 +02:00