Java: Report enums and fix parsing them