The best guidance I can find is in 5.5.7, which confirms that getBean() should return null
in this case, but doesn't say whether getAnnotated or getMember should return null or
not (or if they should return something, what they should return).
We should return the relevant qualifiers - so please file a WELD issue for this.
On 15 Feb 2010, at 04:39, Jordan Ganoff wrote:
The InjectionPoint passed to the producer method as a result of
calling Instance.get() returns null for getAnnotated(), getBean(),getMember(), and has no
qualifiers (regardless of whether the declaration defined them or not). Is this the
intended behavior when injecting Instances for programmatic lookup via Instance.get()?
I'm using Arquillian's jboss-remote-60 profile and haven't had any problems
other than with Instance thus far. Here's a sample of what I'm talking about:
Test.java:
@Inject @Destination Instance<Topic> t;
@Test
public void testInjection()
{
assertNotNull(t.get());
}
TopicProducer.java:
@Produces @Destination
public Topic getTopic(InjectionPoint ip) { ... }
--
Jordan Ganoff
_______________________________________________
weld-dev mailing list
weld-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev