You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by st...@apache.org on 2013/03/12 19:12:27 UTC

svn commit: r1455655 - in /openwebbeans/trunk/webbeans-impl/src: main/java/org/apache/webbeans/util/WebBeansUtil.java test/java/org/apache/webbeans/newtests/specalization/disabledspecialization/VetoMe.java

Author: struberg
Date: Tue Mar 12 18:12:27 2013
New Revision: 1455655

URL: http://svn.apache.org/r1455655
Log:
OWB-788 don't fail on vetoed @Specialized beans

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
    openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/specalization/disabledspecialization/VetoMe.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=1455655&r1=1455654&r2=1455655&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 Mar 12 18:12:27 2013
@@ -655,14 +655,8 @@ public final class WebBeansUtil
         Set<Bean<?>> resolvers = isConfiguredWebBeans(specializedClass, true);
         AlternativesManager altManager = webBeansContext.getAlternativesManager();
 
-        if (resolvers != null)
+        if (resolvers != null && !resolvers.isEmpty())
         {
-            if(resolvers.isEmpty())
-            {
-                throw new InconsistentSpecializationException("Specialized bean for class : " + specializedClass
-                        + " is not enabled in the deployment.");
-            }
-
             specialized = resolvers.iterator().next();
 
             if(resolvers.size() > 1)

Modified: openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/specalization/disabledspecialization/VetoMe.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/specalization/disabledspecialization/VetoMe.java?rev=1455655&r1=1455654&r2=1455655&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/specalization/disabledspecialization/VetoMe.java (original)
+++ openwebbeans/trunk/webbeans-impl/src/test/java/org/apache/webbeans/newtests/specalization/disabledspecialization/VetoMe.java Tue Mar 12 18:12:27 2013
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.webbeans.newtests.specalization.disabledspecialization;
 
 import java.lang.annotation.Documented;