Skip to content

Commit

Permalink
fields annotated @produces are not injection points
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@442 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
Gavin King authored and gavin.king@gmail.com committed Dec 7, 2008
1 parent d45e4fe commit 133563a
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -140,6 +140,8 @@ protected void initInjectionPoints()
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);
Expand All @@ -150,6 +152,7 @@ protected void initInjectionPoints()
}
injectableFields.add(annotatedField);
super.injectionPoints.add(annotatedField);
}
}
}

Expand Down

0 comments on commit 133563a

Please sign in to comment.