Author: dkulp
Date: Wed Nov 28 20:35:12 2012
New Revision: 1414904
URL: http://svn.apache.org/viewvc?rev=1414904&view=rev
Log:
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.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
Modified:
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java?rev=1414904&r1=1414903&r2=1414904&view=diff
==============================================================================
---
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
(original)
+++
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
Wed Nov 28 20:35:12 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())