fix failed compilation on Java8