Fix sonar issue: visibility modifier