sonar warninigs use Collection.isEmpty