Remove Java 1.7 method call