make JDK6 compatible