mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
debugger agent: handle asm issues
This commit is contained in:
@@ -66,9 +66,23 @@ public class CaptureAgent {
|
||||
}
|
||||
}
|
||||
|
||||
instrumentation.appendToSystemClassLoaderSearch(new JarFile(asmPath));
|
||||
try {
|
||||
instrumentation.appendToSystemClassLoaderSearch(new JarFile(asmPath));
|
||||
}
|
||||
catch (Exception e) {
|
||||
String report = "Capture agent: unable to use the provided asm lib";
|
||||
try {
|
||||
Class.forName("org.jetbrains.org.objectweb.asm.MethodVisitor");
|
||||
System.out.println(report + ", will use asm from the classpath");
|
||||
}
|
||||
catch (ClassNotFoundException e1) {
|
||||
System.out.println(report + ", exiting");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
instrumentation.addTransformer(new CaptureTransformer());
|
||||
|
||||
for (Class aClass : instrumentation.getAllLoadedClasses()) {
|
||||
String name = aClass.getName().replaceAll("\\.", "/");
|
||||
if (myCapturePoints.containsKey(name) || myInsertPoints.containsKey(name)) {
|
||||
|
||||
Reference in New Issue
Block a user