Fixes for Sonar-found problems in checkstye codebase

#46 issue for the reference.