I hope we did take care that this rule must not be applied for field 
InjectionPoints?

I know the spec is a bit cryptic for this case, but for fields, @Default is not 
assumed if no other annotation exists.

just to make sure...

LieGrue,
strub



----- Original Message ----
> From: "[email protected]" <[email protected]>
> To: [email protected]
> Sent: Thu, October 15, 2009 10:24:33 PM
> Subject: svn commit: r825636 - 
> /incubator/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/util/AnnotationUtil.java
> 
> 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);




Reply via email to