cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1414898 - /cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
Date Wed, 28 Nov 2012 20:29:32 GMT
Author: dkulp
Date: Wed Nov 28 20:29:31 2012
New Revision: 1414898

URL: http://svn.apache.org/viewvc?rev=1414898&view=rev
Log:
Throw the actual exception if it's a checked exception

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java?rev=1414898&r1=1414897&r2=1414898&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
Wed Nov 28 20:29:31 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())



Mime
View raw message