JCR-2204 : Fix the violations found by Sonar