public static void patch(final CtClass ctClass
is called from HotswapTransformer.transform, it adds $$ha$clinit method to class. Then the class is reloaded by dcevm, so the actual class reinitialization must be called in callback using scheduler.scheduleCommand
. Class is now redefined after 150ms since the class can have be proxied by dynamic proxies (com.sun.proxy, etc...).
Thread t = new Thread(new Runnable() {
@Override
public void run() {
while(true) {
try {
System.err.println("within the loop 7");
Thread.sleep(2000);
if(grid.isAttached() && grid.isVisible() ) {
updateLastActiveRuns();
}
} catch (InterruptedException e1) {
}
}
}
});
t.start();