Author: gavin.king(a)jboss.com
Date: 2008-12-07 12:42:55 -0500 (Sun, 07 Dec 2008)
New Revision: 442
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
Log:
fields annotated @Produces are not injection points
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
===================================================================
---
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2008-12-07
17:16:58 UTC (rev 441)
+++
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java 2008-12-07
17:42:55 UTC (rev 442)
@@ -140,6 +140,8 @@
injectableFields = new HashSet<AnnotatedField<Object>>();
for (AnnotatedField<Object> annotatedField :
annotatedItem.getMetaAnnotatedFields(BindingType.class))
{
+ if ( !annotatedField.isAnnotationPresent(Produces.class) )
+ {
if (annotatedField.isStatic())
{
throw new DefinitionException("Don't place binding annotations on
static fields " + annotatedField);
@@ -150,6 +152,7 @@
}
injectableFields.add(annotatedField);
super.injectionPoints.add(annotatedField);
+ }
}
}