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

AnnotatedTypeConfiguratorTest fails randomly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.1.Final
    • 2.0.0.Final
    • Tests
    • None

      AnnotatedTypeConfiguratorTest modifies the constructors of 'Cat' in an ambiguous way.

      In org.jboss.cdi.tck.tests.extensions.configurators.annotatedTypeConfigurator.ProcessAnnotatedTypeObserver#98

              // remove @Inject and @Cats from constructor with parameter
              annotatedTypeConfigurator.filterConstructors(ac -> ac.getParameters().size() > 0).findFirst().get().remove(a -> a.equals(InjectLiteral.INSTANCE))
                      .filterParams(ap -> ap.getPosition() == 0).findFirst().get().remove(a -> a.equals(Cats.CatsLiteral.INSTANCE));
      

      The important part is "ac -> ac.getParameters().size() > 0"
      Too bad there are 2 constructors with more than 0 parameters: One with a String and another one with Feed
      The correct predicate would be something like

      ac -> ac.getParameters.size() > 0 && ac.getParameters().iterator().next().getType().equals(Feed.class)
      

              mkouba@redhat.com Martin Kouba
              struberg Mark Struberg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: