diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java index 37f3cadea1c2..6016b66f7374 100644 --- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java +++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/instrument/ASMAspectWeaver.java @@ -131,6 +131,9 @@ private void copyPointCutMethods(final MethodNodes methodNodes, final ASMClassNo // remap final ASMMethodNodeAdapter newMethodNode = classNode.getDeclaredMethod(pointCutMethodNode.getName(), pointCutMethodNode.getDesc()); + if (newMethodNode == null) { + throw new InstrumentException("not found new method. " + classNode.getInternalName() + "." + pointCutMethodNode.getName()); + } remapper.setName(methodName); newMethodNode.remapMethodInsnNode(remapper); }