fix build failure on JDK6.