Author: dblevins
Date: Thu Aug 5 17:59:09 2010
New Revision: 982715
URL: http://svn.apache.org/viewvc?rev=982715&view=rev
Log:
Have the option to not be so strict with callback interception signatures. We
may want another way to do this.
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Modified:
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
URL:
http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java?rev=982715&r1=982714&r2=982715&view=diff
==============================================================================
---
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
(original)
+++
openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Thu Aug 5 17:59:09 2010
@@ -179,6 +179,12 @@ public final class WebBeansUtil
{
private static final WebBeansLogger logger =
WebBeansLogger.getLogger(WebBeansUtil.class);
+ /**
+ * Enforcing that interceptor callbacks should not be
+ * able to throw checked exceptions is configurable
+ */
+ public static boolean ENFORCE_CHECKED_EXCEPTION = true;
+
// No instantiate
private WebBeansUtil()
{
@@ -910,7 +916,7 @@ public final class WebBeansUtil
+ " must return void type");
}
- if (ClassUtil.isMethodHasCheckedException(method))
+ if (ENFORCE_CHECKED_EXCEPTION &&
ClassUtil.isMethodHasCheckedException(method))
{
throw new WebBeansConfigurationException("@" +
commonAnnotation.getSimpleName()
+ " annotated method : " + method.getName() + " in
class : " + clazz.getName()
@@ -996,7 +1002,7 @@ public final class WebBeansUtil
+ " must return void type");
}
- if (ClassUtil.isMethodHasCheckedException(method))
+ if (ENFORCE_CHECKED_EXCEPTION &&
ClassUtil.isMethodHasCheckedException(method))
{
throw new WebBeansConfigurationException("@" +
commonAnnotation.getSimpleName()
+ " annotated method : " + method.getName() + " in
class : " + clazz.getName()