Details
-
Task
-
Resolution: Done
-
Minor
-
None
-
None
-
None
-
Undefined
Description
Using Collection.size() to test for emptiness works, but using Collection.isEmpty() makes the code more readable and can be more performant. The time complexity of any isEmpty() method implementation should be O(1) whereas some implementations of size() can be O.
details - https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html#isEmpty--
Attachments
Issue Links
- relates to
-
WFLY-14972 Check emptiness with Collection.isEmpty()
- Closed