Uploaded image for project: 'CDI TCK'
  1. CDI TCK
  2. CDITCK-70

Issue with org.jboss.jsr299.tck.tests.lookup.injection.non.contextual.ContainerEventTest

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 1.0.0.GA
    • Fix Version/s: 1.0.1.CR1, 1.1.0.Alpha1
    • Component/s: Tests
    • Labels:
      None
    • Environment:

      JDK 6 u15, GlassFish v3 b72, CDI TCK 1.0.1 RC1

      Description

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                jharting Jozef Hartinger
                Reporter:
                jitu Jitendra Kotamraju
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: