FORUM-991 | Fix critical violations in Sonar