correct hash in jdk 7