Commit 976d88f0 authored by Petri Hintukainen's avatar Petri Hintukainen

BDJClassFileTransformer: fix IllegalStateException

"ClassReader.accept() should be called with EXPAND_FRAMES flag"
parent d9c84fac
......@@ -65,7 +65,7 @@ public class BDJClassFileTransformer
ClassReader cr = new ClassReader(b);
ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_FRAMES/* | ClassWriter.COMPUTE_MAXS*/);
ClassVisitor cv = new RemappingClassAdapter(cw, m);
cr.accept(cv, ClassReader.SKIP_DEBUG);
cr.accept(cv, ClassReader.SKIP_DEBUG | ClassReader.EXPAND_FRAMES);
return cw.toByteArray();
} catch (Exception e) {
logger.error("Failed renaming class: " + e);
......@@ -87,7 +87,7 @@ public class BDJClassFileTransformer
ClassReader cr = new ClassReader(r);
ClassWriter cw = new ClassWriter(cr, 0/*ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS*/);
ClassVisitor cv = new MyClassVisitor(cw);
cr.accept(cv, ClassReader.SKIP_DEBUG);
cr.accept(cv, ClassReader.SKIP_DEBUG | ClassReader.EXPAND_FRAMES);
return cw.toByteArray();
} catch (Exception e) {
logger.error("Failed transforming class: " + e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment