changes done due to jdk 7 api changes