fix compile error on Java 8