adapt jdk1.6