Don't use a method from Java 7