Author: rmannibucau
Date: Mon Apr 15 21:05:18 2013
New Revision: 1468228
URL: http://svn.apache.org/r1468228
Log:
OWB-837 missing InvocationTargetException catching
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/LifecycleInterceptorInvocationContext.java
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/LifecycleInterceptorInvocationContext.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/LifecycleInterceptorInvocationContext.java?rev=1468228&r1=1468227&r2=1468228&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/LifecycleInterceptorInvocationContext.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/intercept/LifecycleInterceptorInvocationContext.java
Mon Apr 15 21:05:18 2013
@@ -18,10 +18,13 @@
*/
package org.apache.webbeans.intercept;
+import org.apache.webbeans.util.ExceptionUtil;
+
import javax.enterprise.inject.spi.AnnotatedMethod;
import javax.enterprise.inject.spi.InterceptionType;
import javax.enterprise.inject.spi.Interceptor;
import javax.interceptor.InvocationContext;
+import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.List;
@@ -92,7 +95,14 @@ public class LifecycleInterceptorInvocat
{
m.setAccessible(true);
}
- m.invoke(getTarget());
+ try
+ {
+ m.invoke(getTarget());
+ }
+ catch (final InvocationTargetException ite)
+ {
+ throw
ExceptionUtil.throwAsRuntimeException(ite.getCause());
+ }
}
}
// else, see interceptors spec