1.1 --- a/javap/src/main/java/sun/tools/javap/AnnotationParser.java Mon Nov 12 00:07:34 2012 +0100
1.2 +++ b/javap/src/main/java/sun/tools/javap/AnnotationParser.java Mon Nov 12 07:07:40 2012 +0100
1.3 @@ -68,25 +68,25 @@
1.4 String typeName = cd.StringValue(type);
1.5 int cnt = dis.readUnsignedShort();
1.6 for (int i = 0; i < cnt; i++) {
1.7 - readCmp(dis, cd, typeName);
1.8 + String attrName = cd.StringValue(dis.readUnsignedShort());
1.9 + readValue(dis, cd, typeName, attrName);
1.10 }
1.11 }
1.12
1.13 - private void readCmp(DataInputStream dis, ClassData cd, String typeName)
1.14 + private void readValue(DataInputStream dis, ClassData cd, String typeName, String attrName)
1.15 throws IOException {
1.16 - String name = cd.StringValue(dis.readUnsignedShort());
1.17 char type = (char)dis.readByte();
1.18 if (type == '@') {
1.19 readAnno(dis, cd);
1.20 } else if ("CFJZsSIDB".indexOf(type) >= 0) { // NOI18N
1.21 int primitive = dis.readUnsignedShort();
1.22 - visitAttr(typeName, name, cd.StringValue(primitive));
1.23 + visitAttr(typeName, attrName, cd.StringValue(primitive));
1.24 } else if (type == 'c') {
1.25 int cls = dis.readUnsignedShort();
1.26 } else if (type == '[') {
1.27 int cnt = dis.readUnsignedShort();
1.28 for (int i = 0; i < cnt; i++) {
1.29 - readCmp(dis, cd, typeName);
1.30 + readValue(dis, cd, typeName, attrName);
1.31 }
1.32 } else if (type == 'e') {
1.33 int enumT = dis.readUnsignedShort();