Get rid of JDK7 specific methods.