SONAR-5801 support empty files

+ fix quality flaws