Set instrumentation instance a bit earlier.
@@ -47,6 +47,7 @@ public class Recaf {
}
private static void agent(String args, Instrumentation inst) {
+ InstrumentationResource.instrumentation = inst;
if (Recaf.class.getClassLoader() == ClassLoader.getSystemClassLoader()) {
warn("Recaf was attached and loaded into system class loader," +
" that is not a good thing!");
@@ -61,7 +62,6 @@ public class Recaf {
else if(args.contains("--instrument"))
args = args + ",--instrument";
// Set instance
- InstrumentationResource.instrumentation = inst;
// Start Recaf
launch(args.split("[=,]"));
}
