-
Task
-
Resolution: Done
-
Major
-
24.0.0.Final
-
None
-
Undefined
-
https://github.com/wildfly/wildfly/pull/14435, https://github.com/wildfly/wildfly/pull/14436, https://github.com/wildfly/wildfly/pull/14437, https://github.com/wildfly/wildfly/pull/14438, https://github.com/wildfly/wildfly/pull/14439, https://github.com/wildfly/wildfly/pull/14440, https://github.com/wildfly/wildfly/pull/14441, https://github.com/wildfly/wildfly/pull/14442, https://github.com/wildfly/wildfly/pull/14443, https://github.com/wildfly/wildfly/pull/14445, https://github.com/wildfly/wildfly/pull/14448, https://github.com/wildfly/wildfly/pull/14450, https://github.com/wildfly/wildfly/pull/14451
Check emptiness with Collection.isEmpty() instead of size(). The time complexity of any isEmpty() method implementation should be O ( 1 ) whereas some implementations of size() can be O ( n ).
Refers to https://rules.sonarsource.com/java/RSPEC-1155
- is related to
-
JBTM-3517 Collection.isEmpty() should be used to test for emptiness
- Closed