openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1601025 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
Date Fri, 06 Jun 2014 22:27:09 GMT
Author: struberg
Date: Fri Jun  6 22:27:09 2014
New Revision: 1601025

URL: http://svn.apache.org/r1601025
Log:
also detect Alternatives if they are Stereotypes

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java?rev=1601025&r1=1601024&r2=1601025&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/inject/AlternativesManager.java
Fri Jun  6 22:27:09 2014
@@ -123,13 +123,14 @@ public class AlternativesManager
      */
     public void addXmlClazzAlternative(Class<?> alternative)
     {
-        if(AnnotationUtil.hasClassAnnotation(alternative, Alternative.class))
+        if (AnnotationUtil.hasClassAnnotation(alternative, Alternative.class) ||
+            AnnotationUtil.hasMetaAnnotation(alternative.getAnnotations(), Alternative.class))
         {
             configuredAlternatives.add(alternative);
         }
         else
         {
-            throw new WebBeansConfigurationException("Given class : " + alternative.getName()
+ " is not annotated with @Alternative" );
+            throw new WebBeansConfigurationException("Given class : " + alternative.getName()
+ " is not annotated with @Alternative");
         }
     }
 



Mime
View raw message