changed a function that is defined in JDK 1.7 into a deprecated one so that the code builds on Jenkins