Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-974

@Alternative @Specializes does not work

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Done
    • 1.1.2.Final
    • 1.1.4.Final
    • None
    • None

    Description

      See pull request with testcase.

      @ApplicationScoped
      @Named("namedFoo") // doesn't matter if it's @Named or not
      public class NamedFoo
      {
      
      }
      
      @Alternative @Specializes
      public class SpecializesNamedFoo extends NamedFoo
      {
      
      }
      
      
         @Test
         public void testSpecializationWithAlternative()
         {
            Assert.assertEquals(NamedFoo.class, beanManager.resolve(beanManager.getBeans(NamedFoo.class)).getBeanClass()); // FAILS WITH NPE!
         }
      

      Attachments

        Issue Links

          Activity

            People

              ajustin@redhat.com Ales Justin
              gdesmet@redhat.com Geoffrey De Smet
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: