Fix compile error with jdk compiler