SONAR-2291 fix bad message
Fix compatibility with Java 5