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

AnnotatedTypeConfiguratorTest fails randomly

    XMLWordPrintable

Details

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

    Description

      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)
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty