[
https://issues.jboss.org/browse/WELD-974?page=com.atlassian.jira.plugin.s...
]
Geoffrey De Smet commented on WELD-974:
---------------------------------------
Hi Jens,
The alternative is deliberately not activated: the testcase should expect to get a
NamedFoo.class instead, not a SpecializesNamedFoo.class.
The bug is that the presence of SpecalizesNamedFoo creates an NPE on
{code}
beanManager.resolve(beanManager.getBeans(NamedFoo.class))
{code}
@Alternative @Specializes does not work
---------------------------------------
Key: WELD-974
URL:
https://issues.jboss.org/browse/WELD-974
Project: Weld
Issue Type: Bug
Affects Versions: 1.1.2.Final
Reporter: Geoffrey De Smet
Priority: Critical
See pull request with testcase.
{code}
@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!
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira