ECMS-5578 Fix some sonar violations