Collection count can be converted to size
Reports calls to
This function call can be replaced with
.size form ensures that the operation is O(1) and won't allocate extra objects, whereas
count() could be confused with
Iterable<T>.count(), which is O(n) and allocating.
After the quick-fix is applied:
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3