SONARJAVA-320 Fix a NPE