You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by be...@apache.org on 2010/02/24 00:17:38 UTC

svn commit: r915582 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java

Author: bergmark
Date: Tue Feb 23 23:17:38 2010
New Revision: 915582

URL: http://svn.apache.org/viewvc?rev=915582&view=rev
Log:
[OWB-299] checkDecoratorResolverParams now checks that all of the annotations are qualifiers

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=915582&r1=915581&r2=915582&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 Feb 23 23:17:38 2010
@@ -1908,6 +1908,10 @@
         Annotation old = null;
         for (Annotation qualifier : qualifiers)
         {
+            if (!AnnotationUtil.isQualifierAnnotation(qualifier.annotationType()))
+            {
+                throw new IllegalArgumentException("Manager.resolveDecorators() method parameter qualifiers array can not contain other annotation that is not @Qualifier");
+            }
             if (old == null)
             {
                 old = qualifier;
@@ -1919,11 +1923,6 @@
                     throw new IllegalArgumentException("Manager.resolveDecorators() method parameter qualifiers array argument can not define duplicate qualifier annotation with name : @" + old.annotationType().getName());
                 }
 
-                if (!AnnotationUtil.isQualifierAnnotation(qualifier.annotationType()))
-                {
-                    throw new IllegalArgumentException("Manager.resolveDecorators() method parameter qualifiers array can not contain other annotation that is not @Qualifier");
-                }
-
                 old = qualifier;
             }
         }