SONAR-4898 fix compatibility with Java 6