Type annotations cause ArrayIndexOutOfBoundsException
When ClassReader reads a class file containing type annotations, it fails with the following
exception:
java.lang.ArrayIndexOutOfBoundsException: 15
at org.springframework.asm.ClassReader.readLabel(ClassReader.java:2185)
at org.springframework.asm.ClassReader.readTypeAnnotations(ClassReader.java:1614)
....
I've been able to put together a tiny maven project that reproduces the problem (see attachment).
All you need to do is run "mvn test".
The problem occurs in ASM 5.0.4 and 5.1.
I've discovered it while using Spring, which incorporates ASM. I've submitted a ticket at Spring
(https://jira.spring.io/browse/SPR-14089), giving more details about the source code and my
findings in the attached project.
Since Spring simply copies the ASM code, I think the best solution is to fix the problem in ASM
itself.
Regards,
Tom