fix openjdk erasure problems.