Type safety in the jvm: some problems in jdk 1