Sometime i modify a class the hotswap reload in IntelliJ says it was done but when i open the part of the java programm where the hotswap was done i sometime get a classCastExpection saying something MayPackage.MyClass cannot be cast to MyPackage.MyClass (both are identical)
Only solution for me : stop and rerun the programm (so without hotswap)
Is this a known issue ? Or did someone in my company add something that made hotswap not work anymore for some components :/
ps: any chance to have some kind of automatic builder on the hotswap page that automatically detect new adoptopenjdk release and put out a new DECVM JDK ;)
public static void patch(final CtClass ctClassis 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...).