cafebabe
cafebabe copied to clipboard
Sanitize class files
CC: @manoskouk By adding duplicated methods/fields is possible to generate ill-formed class files without any warnings; failing at runtime with ClassFormatError. Tracking duplicated methods/fields is a bit hard since methods can change their static-ness; the check should be done on build-time... I have a slightly more general solution; which consists in loading the class file (without resolving any dependencies) after being generated just to verify it's correctness by ensuring it passes the JVM checks. Any comments?