fix bug with enumeration in Java compiler