sonar bug: condition always true