ASM 6.1: ClassReader.readCode() throws NullPointerException
class ClassReader {
// ...
private void readCode(
final MethodVisitor methodVisitor, final Context context, final int codeOffset) {
// ...
if (invisibleTypeAnnotationOffsets != null) { // <-- **in**visibleTypeAnnotationOffsets here
for (int i = 0; i < invisibleTypeAnnotationOffsets.length; ++i) { // <-- **in**visibleTypeAnnotationOffsets here
int targetType = readByte(visibleTypeAnnotationOffsets[i]); // <-- visibleTypeAnnotationOffsets here (line 2354)
// ...
}
}
// ...
}
// ...
}
As you can see we check that invisibleTypeAnnotationOffsets is not null, but then we read a byte from visibleTypeAnnotationOffsets. It can be a misprint...
ASM 6.0 works correctly.