openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bergm...@apache.org
Subject svn commit: r915582 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/WebBeansUtil.java
Date Tue, 23 Feb 2010 23:17:38 GMT
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;
             }
         }



Mime
View raw message