[cdi-dev] InjectionPoint when injecting into Decorators
jharting at redhat.com
Tue Jul 8 03:32:43 EDT 2014
This was supposed to be fixed by https://issues.jboss.org/browse/CDI-78
(see https://github.com/cdi-spec/cdi/pull/21/files) but it seems the
proposed changes never actually got to the specification although the
issue is marked as resolved :-/
On 07/08/2014 08:58 AM, Mark Struberg wrote:
> I struggle with a few TCK tests which assume that in Decorators and
> Interceptors you can have an @Inject ct which has a valid InjectionPoint.
> But I cannot find in the spec how this is supposed to work.
> 5.5.7 defines in which situations the CDI container must create an
> An instance of InjectionPoint may represent:
> . an injected field or a parameter of a bean constructor, initializer
> method, producer method, disposer method or observer method, or
> . an instance obtained dynamically using Instance.get().
> But if you e.g. look at
> public OrderedEventDeliveryDecorator(@Delegate Event<T> delegate,
> InjectionPoint ip, BeanManager manager,
> OrderedEventDeliveryExtension extension)
> then this does not fit any requirement imo. Because the Decorator is a
> dependent bean on the decorated contextual instance.
> Thus it's 'internal' and does not have any InjectionPoint. This would
> be different if you would @Inject the Decorator into some other bean...
> The TCK test in question is ComplexEventDecoratorTest#testOrderedEvents
> Did I overlook something?
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cdi-dev