SONAR-926 Remove usage of ResourceCreationLock
Fix build on Java 6
Fix some quality flaws