Skip to content

Commit

Permalink
Fix #291 - npe in private enum
Browse files Browse the repository at this point in the history
  • Loading branch information
skybber committed Mar 16, 2019
1 parent e4fe027 commit 75f63ed
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.hotswap.agent.javassist.expr.ExprEditor;
import org.hotswap.agent.javassist.expr.FieldAccess;
import org.hotswap.agent.logging.AgentLogger;
import org.hotswap.agent.util.ReflectionHelper;

/**
* ClassInitPlugin initializes static (class) variables after class redefinition. Initializes new enumeration values.
Expand Down Expand Up @@ -123,6 +124,7 @@ public void executeCommand() {
Class<?> clazz = classLoader.loadClass(className);
Method m = clazz.getDeclaredMethod(HOTSWAP_AGENT_CLINIT_METHOD, new Class[] {});
if (m != null) {
m.setAccessible(true);
m.invoke(null, new Object[] {});
}
} catch (Exception e) {
Expand Down

0 comments on commit 75f63ed

Please sign in to comment.