Author: dkulp Date: Wed Nov 28 20:39:15 2012 New Revision: 1414911 URL: http://svn.apache.org/viewvc?rev=1414911&view=rev Log: Merged revisions 1414904 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1414904 | dkulp | 2012-11-28 15:35:12 -0500 (Wed, 28 Nov 2012) | 10 lines Merged revisions 1414898 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1414898 | dkulp | 2012-11-28 15:29:31 -0500 (Wed, 28 Nov 2012) | 2 lines Throw the actual exception if it's a checked exception ........ ........ Modified: cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java Modified: cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java?rev=1414911&r1=1414910&r2=1414911&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java (original) +++ cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java Wed Nov 28 20:39:15 2012 @@ -25,6 +25,7 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import java.lang.reflect.InvocationHandler; +import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; @@ -50,7 +51,9 @@ public class ReflectionInvokationHandler try { Method m = target.getClass().getMethod(method.getName(), getParameterTypes(method, args)); ReflectionUtil.setAccessible(m); - return wrapReturn(wr, m.invoke(target, args)); + return wrapReturn(wr, m.invoke(target, args)); + } catch (InvocationTargetException e) { + throw e.getCause(); } catch (NoSuchMethodException e) { for (Method m2 : target.getClass().getMethods()) { if (m2.getName().equals(method.getName())
