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

@Alternative @Specializes does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 1.1.4.Final
    • 1.1.2.Final
    • None
    • None

      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!
         }
      

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

                Created:
                Updated:
                Resolved: