Skip to content

Commit

Permalink
Skip invalid bytecode for deadcoderemover
Browse files Browse the repository at this point in the history
  • Loading branch information
ThisTestUser authored Oct 12, 2021
1 parent 7d5fba7 commit 76c1bbf
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ public boolean transform() throws Throwable {

InstructionModifier modifier = new InstructionModifier();

Frame<BasicValue>[] frames = new Analyzer<>(new BasicInterpreter()).analyze(classNode.name, methodNode);
Frame<BasicValue>[] frames;
try {
frames = new Analyzer<>(new BasicInterpreter()).analyze(classNode.name, methodNode);
} catch (AnalyzerException e) {
oops("unexpected analyzer exception", e);
continue;
}
for (int i = 0; i < methodNode.instructions.size(); i++) {
if (!Utils.isInstruction(methodNode.instructions.get(i))) continue;
if (frames[i] != null) continue;
Expand Down

0 comments on commit 76c1bbf

Please sign in to comment.