fix compilation with Java 8