invalidFrames in ClassWriter.toByteArray() causes trouble on older bytecode. Frames should be ignored?
Added the reproduction app. Can be run with:
mvn clean package exec:java
It will get exception:
Caused by: java.lang.RuntimeException: JSR/RET are not supported with
computeFrames option
It should not get this exception.
Some older javac (java4) and byte code generation libraryes (Jboss4 JSP
compiler for example) generate JSR/RET bytecode instructions and the bytecode
level of those files will be older then Java 6+.
Now if you have a generic method processor that uses the a visitFrame
instruction then this will affect some the state the transformation will fail
on ClassWriter.toByteArray becasue it will re-read the soruce bytecode with
it's own flags and tryes to generate some stackframes althouh this bytecode
does not support it anyway.
I think visitFrame should be ignored on older bytecode transformations.