From 6bb0478ede6e3bb61237fe1a64374545cdc18e95 Mon Sep 17 00:00:00 2001 From: Woonduk Kang Date: Fri, 14 Sep 2012 09:35:50 +0000 Subject: [PATCH] =?UTF-8?q?[=EA=B0=95=EC=9A=B4=EB=8D=95]=20[LUCYSUS-1744]?= =?UTF-8?q?=20=EC=9D=B8=ED=84=B0=EC=85=89=ED=84=B0=20=EC=9E=AC=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EB=A1=9C=EC=A7=81=20=EB=B2=84=EA=B7=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-tomcat-profiler/trunk@658 84d0f5b1-2673-498c-a247-62c4ff18d310 --- .../com/profiler/interceptor/bci/JavaAssistClass.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/profiler/interceptor/bci/JavaAssistClass.java b/src/main/java/com/profiler/interceptor/bci/JavaAssistClass.java index b77e74ce7..262a653fa 100644 --- a/src/main/java/com/profiler/interceptor/bci/JavaAssistClass.java +++ b/src/main/java/com/profiler/interceptor/bci/JavaAssistClass.java @@ -160,11 +160,17 @@ public class JavaAssistClass implements InstrumentClass { behavior = getBehavior(methodName, args); } catch (NotFoundException e) { // target method나 constructor를 차지 못했을 경우는 NotFoundInstrumentException을 던진다. - throw new NotFoundInstrumentException(interceptor.getClass().getSimpleName() + " add fail. Cause:" + e.getMessage(), e); + if (interceptor == null) { + throw new NotFoundInstrumentException(interceptorId + " add fail. Cause:" + e.getMessage(), e); + } else { + throw new NotFoundInstrumentException(interceptor.getClass().getSimpleName() + " add fail. Cause:" + e.getMessage(), e); + } } try { if (interceptor != null) { interceptorId = InterceptorRegistry.addInterceptor(interceptor); + } else { + interceptor = InterceptorRegistry.getInterceptor(interceptorId); } if (type == Type.auto) { if (interceptor instanceof StaticAroundInterceptor) {