JUDDI-927 fixed, tested with sun jdk8