Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in HotswapAgent if private static enum is used. #291

Closed
mkamalov opened this issue Mar 11, 2019 · 0 comments
Closed

NPE in HotswapAgent if private static enum is used. #291

mkamalov opened this issue Mar 11, 2019 · 0 comments

Comments

@mkamalov
Copy link

Hi,

I have private static enum in my code. When I change outer class my code starts fail with NPE on enum.values() method in runtime.

I used 1.1.0-SNAPSHOT and 1.3.1-SNAPSHOT - both fail with the same way.

In console I have following exception:
HOTSWAP AGENT: 07:45:42.670 ERROR (org.hotswap.agent.plugin.jvm.ClassInitPlugin) - Patching __ha_clinit method failed.
java.lang.NullPointerException
at org.hotswap.agent.plugin.jvm.ClassInitPlugin.checkOldEnumValues(ClassInitPlugin.java:130)
at org.hotswap.agent.plugin.jvm.ClassInitPlugin.access$100(ClassInitPlugin.java:31)
at org.hotswap.agent.plugin.jvm.ClassInitPlugin$1.edit(ClassInitPlugin.java:84)
at org.hotswap.agent.javassist.expr.ExprEditor.loopBody(ExprEditor.java:198)
at org.hotswap.agent.javassist.expr.ExprEditor.doit(ExprEditor.java:91)
at org.hotswap.agent.javassist.CtBehavior.instrument(CtBehavior.java:712)
at org.hotswap.agent.plugin.jvm.ClassInitPlugin.patch(ClassInitPlugin.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:193)
at org.hotswap.agent.annotation.handler.PluginClassFileTransformer.transform(PluginClassFileTransformer.java:89)
at org.hotswap.agent.util.HotswapTransformer.transform(HotswapTransformer.java:184)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant