- name = cp.getUtf8ByIndex(in.readShort());
- type = cp.getType(in.readShort());
- attrs = new ClassGen.AttrGen(cp, in);
+ if((flags & ~VALID_FIELD_FLAGS) != 0)
+ throw new ClassFile.ClassReadExn("invalid flags");
+ name = cp.getUtf8KeyByIndex(in.readShort());
+ type = Type.instance(cp.getUtf8KeyByIndex(in.readShort()));
+ attrs = new ClassFile.AttrGen(in,cp);