clean up blockers from sonar
fix more sonar critical and blocker issues
more sonar criticals
fix NPE
[bamboo] Automated branch merge (from features/sonar-cleanup:2cdd1a58580b5aa14287d38cadeb1812024e40eb)