Clears caches of the JDK after a class is redefined:
java.beans.Introspectorcaches (bean info of the class) in all thread groups. Frameworks use them for property access.java.io.ObjectStreamClasscaches (serialization descriptors), so a redefinedSerializableclass is serialized with its new fields.
This plugin replaces the former JavaBeans plugin.
Implementation notes:
The caches are cleared on any class redefinition.
On JetBrains Runtime or DCEVM with -XX:HotswapAgent=... the JVM opens the needed modules. On another JDK 17+ with
-javaagent, add --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.desktop/java.beans=ALL-UNNAMED
--add-opens java.desktop/com.sun.beans=ALL-UNNAMED, otherwise the plugin cannot access the caches and logs an error on every
redefinition.