Correcting code for openjdk6