Cleared the Sonar Major findings for using isEmpty() to check whether th...

...e collection is empty or not.