-
Bug
-
Resolution: Done
-
Major
-
1.0.0.GA
-
None
-
JDK 6 u15, GlassFish v3 b72, CDI TCK 1.0.1 RC1
org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.TestFilter
--------------------------------------------------------------------------------------------------------------------
public class TestFilter implements Filter
{
@Inject
private Sheep sheep;
private boolean injectionPerformedCorrectly = false;
private boolean initializerCalled = false;
private boolean initCalledAfterInitializer = false;
@Inject
public void initialize(Sheep sheep) {}
public void destroy(){}
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException{}
public void init(FilterConfig filterConfig) throws ServletException{}
}
AnnotatedType
-------------------------
AnnotatedType extends Annotated {
/**
- Get the business methods belonging to the class.
* - @return the methods, or an empty set if none are defined
*/
public Set<AnnotatedMethod<? super X>> getMethods();
/**
- Get the fields belonging to the class
* - @return the fields, or an empty set if none are defined
*/
public Set<AnnotatedField<? super X>> getFields();
}
ContainerEventTest.java
-----------------------------------------
private void validateFilterAnnotatedType(AnnotatedType<TestFilter> type)
{ assert type.getFields().size() == 2; assert type.getMethods().size() == 3; }- The javadoc is not clear what getMethods() and getFields() supposed to return. Do they supposed to return all methods and fields or only with @Inject annotation ? Either way, the number of fields should be 4 or 1. So the assertion doesn't seem correct to me.
Other testcases affected are:
testProcessAnnotatedTypeEventFiredForFilter
testProcessAnnotatedTypeEventFiredForJsfManagedBean
testProcessAnnotatedTypeEventFiredForServletListener
testProcessAnnotatedTypeEventFiredForTagLibraryListener