Fix sonar warning #2895