openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1847526 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Date Tue, 27 Nov 2018 10:37:15 GMT
Author: rmannibucau
Date: Tue Nov 27 10:37:15 2018
New Revision: 1847526

URL: http://svn.apache.org/viewvc?rev=1847526&view=rev
Log:
same workaround as in inspectDefinitionErrorStack for inspectDeploymentErrorStack

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=1847526&r1=1847525&r2=1847526&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
Tue Nov 27 10:37:15 2018
@@ -110,6 +110,7 @@ import javax.enterprise.inject.spi.BeanA
 import javax.enterprise.inject.spi.BeanManager;
 import javax.enterprise.inject.spi.BeforeBeanDiscovery;
 import javax.enterprise.inject.spi.BeforeShutdown;
+import javax.enterprise.inject.spi.DefinitionException;
 import javax.enterprise.inject.spi.DeploymentException;
 import javax.enterprise.inject.spi.Extension;
 import javax.enterprise.inject.spi.InjectionPoint;
@@ -1127,7 +1128,16 @@ public final class WebBeansUtil
             if(stack.hasErrors())
             {
                 stack.logErrors();
-                throw new WebBeansDeploymentException(logMessage);
+
+                // just because of some TCK and spec insanity v2...reversed compared to previous
one
+                if (stack.iterator().next() instanceof DefinitionException)
+                {
+                    throw new WebBeansConfigurationException(logMessage);
+                }
+                else
+                {
+                    throw new WebBeansDeploymentException(logMessage);
+                }
             }
         }
         finally



Mime
View raw message