This content has been marked as final.
Show 3 replies
-
1. Re: Weld SE, Instance<> and @New - NPE
nickarls Mar 22, 2010 9:02 AM (in response to wujek)My own tree is a bit broken so I can't test right now but you could you please file a JIRA as the NPE is wrong in any case.
-
2. Re: Weld SE, Instance<> and @New - NPE
wujek Mar 22, 2010 10:38 AM (in response to wujek)Thanks. Filed an issue: https://jira.jboss.org/jira/browse/WELD-471.
-
3. Re: Weld SE, Instance<> and @New - NPE
nickarls Mar 22, 2010 2:19 PM (in response to wujek)I think the injection system misinterprets the @New as belonging to the @Inject Instance and not to what the Instance is injecting. If I guard myself against the NPE:s I end up with a
org.jboss.weld.exceptions.DefinitionException: WELD-000816 Cannot determine constructor to use for javax.enterprise.inject.Instance<[class org.jboss.weld.tests.scope.up2.Foo]>
for a
org.jboss.weld.bean-test-NewManagedBean-javax.enterprise.inject.Instance<org.jboss.weld.tests.scope.up2.Foo>
which is a @New @Instance implementation
Have to check with Pete how to handle it or what is the correct behaviour