[FIXED JENKINS-24041] Doen't use JDK7 methods