@@ -928,7 +928,7 @@ private Object getFieldConstantPoolValue(final int tag, final char fieldTypeDesc
928
928
default :
929
929
// ClassGraph doesn't expect other types
930
930
// (N.B. in particular, enum values are not stored in the constant pool, so don't need to be handled)
931
- throw new ClassfileFormatException ("Unknown constant pool tag " + tag + ", "
931
+ throw new ClassfileFormatException ("Unknown field constant pool tag " + tag + ", "
932
932
+ "cannot continue reading class. Please report this at "
933
933
+ "https://github.com/classgraph/classgraph/issues" );
934
934
}
@@ -1097,13 +1097,14 @@ private void readConstantPoolEntries() throws IOException {
1097
1097
entryOffset [i ] = reader .currPos ();
1098
1098
switch (entryTag [i ]) {
1099
1099
case 0 : // Impossible, probably buffer underflow
1100
- throw new ClassfileFormatException ("Unknown constant pool tag 0 in classfile " + relativePath
1100
+ throw new ClassfileFormatException ("Invalid constant pool tag 0 in classfile " + relativePath
1101
1101
+ " (possible buffer underflow issue). Please report this at "
1102
1102
+ "https://github.com/classgraph/classgraph/issues" );
1103
1103
case 1 : // Modified UTF8
1104
1104
final int strLen = reader .readUnsignedShort ();
1105
1105
reader .skip (strLen );
1106
1106
break ;
1107
+ // There is no constant pool tag type 2
1107
1108
case 3 : // int, short, char, byte, boolean are all represented by Constant_INTEGER
1108
1109
case 4 : // float
1109
1110
reader .skip (4 );
@@ -1145,12 +1146,16 @@ private void readConstantPoolEntries() throws IOException {
1145
1146
}
1146
1147
indirectStringRefs [i ] = (nameRef << 16 ) | typeRef ;
1147
1148
break ;
1149
+ // There is no constant pool tag type 13 or 14
1148
1150
case 15 : // method handle
1149
1151
reader .skip (3 );
1150
1152
break ;
1151
1153
case 16 : // method type
1152
1154
reader .skip (2 );
1153
1155
break ;
1156
+ case 17 : // dynamic
1157
+ reader .skip (4 );
1158
+ break ;
1154
1159
case 18 : // invoke dynamic
1155
1160
reader .skip (4 );
1156
1161
break ;
0 commit comments