Fail when there is an ASM error

Otherwise during a build, Locked Region Code Injection may encounter an
ASM Analyzer exception, and the build will not fail, even though
injection won't have succeeded.

Test: make
Change-Id: Iee69f1a78fde735db62c7f73405b8cec4e410793
This commit is contained in:
Benoit Lamarche
2018-01-22 17:38:41 +01:00
parent b3c2efc615
commit 9f17dfcba6

View File

@@ -18,7 +18,6 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.TryCatchBlockSorter;
@@ -101,7 +100,7 @@ class LockFindingClassVisitor extends ClassVisitor {
try {
a.analyze(owner, mn);
} catch (AnalyzerException e) {
e.printStackTrace();
throw new RuntimeException("Locked region code injection: " + e.getMessage(), e);
}
InsnList instructions = mn.instructions;