openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r825636 - /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
Date Thu, 15 Oct 2009 20:24:33 GMT
Author: gerdogdu
Date: Thu Oct 15 20:24:32 2009
New Revision: 825636

URL: http://svn.apache.org/viewvc?rev=825636&view=rev
Log:
[OWB-142] If an injection point declares no qualifier, then @Default should be assumed. Thanks
to Joe Bergmark

Modified:
    incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java

Modified: incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java?rev=825636&r1=825635&r2=825636&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
(original)
+++ incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
Thu Oct 15 20:24:32 2009
@@ -32,6 +32,7 @@
 import javax.inject.Qualifier;
 import javax.interceptor.InterceptorBinding;
 
+import org.apache.webbeans.annotation.DefaultLiteral;
 import org.apache.webbeans.exception.WebBeansConfigurationException;
 import org.apache.webbeans.plugins.OpenWebBeansPlugin;
 import org.apache.webbeans.plugins.PluginLoader;
@@ -509,6 +510,13 @@
                 set.add(annot);
             }
         }
+        
+        //Add the default qualifier if no others exist.  Section 3.10, OWB-142///
+        if(set.size() == 0)
+        {
+        	set.add(new DefaultLiteral());
+        }
+        ////////////////////////////////////////////////////////////////////////
 
         Annotation[] a = new Annotation[set.size()];
         a = set.toArray(a);



Mime
View raw message