incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n..@apache.org
Subject svn commit: r918768 - /incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AbstractServiceReferenceRecipe.java
Date Wed, 03 Mar 2010 23:26:16 GMT
Author: not
Date: Wed Mar  3 23:26:16 2010
New Revision: 918768

URL: http://svn.apache.org/viewvc?rev=918768&view=rev
Log:
ARIES-211 Unwrap an InvocationTargetException and rethrow in the JDKProxyFactory InvocationHandler

Modified:
    incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AbstractServiceReferenceRecipe.java

Modified: incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AbstractServiceReferenceRecipe.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AbstractServiceReferenceRecipe.java?rev=918768&r1=918767&r2=918768&view=diff
==============================================================================
--- incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AbstractServiceReferenceRecipe.java
(original)
+++ incubator/aries/trunk/blueprint/blueprint-core/src/main/java/org/apache/aries/blueprint/container/AbstractServiceReferenceRecipe.java
Wed Mar  3 23:26:16 2010
@@ -19,6 +19,7 @@
 package org.apache.aries.blueprint.container;
 
 import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Proxy;
 import java.net.URL;
@@ -609,7 +610,11 @@
         public Object createProxy(final ClassLoader classLoader, final Class[] classes, final
Callable<Object> dispatcher) {
             return Proxy.newProxyInstance(classLoader, getInterfaces(classes), new InvocationHandler()
{
                 public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
{
-                    return method.invoke(dispatcher.call(), args);
+                    try {
+                        return method.invoke(dispatcher.call(), args);
+                    } catch (InvocationTargetException ite) {
+                      throw ite.getTargetException();
+                    }
                 }
             });
         }



Mime
View raw message