Fix some simple Sonar warnings.