Sonar code validation issue fixed