UseCollectionIsEmpty violation fix inverts condition from if( list1.size() > 0 ){ ... } to if( list1.isEmpty() ){ ... }