Size check can be replaced with 'isNotEmpty()'

Last modified: 03 December 2024

Reports size checks of Collections/Array/String that should be replaced with isNotEmpty().

Using isNotEmpty() makes your code simpler.

The quick-fix replaces the size check with isNotEmpty().

Example:

After the quick-fix is applied: