Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.2
-
None
Description
BeansDeployer generally does the right thing and doesn't attempt to ensure that @Delegate injection points only resolve to a single bean.
However, if you have a Decorator that decorates a passivating scope bean (@SessionScoped, @ConversationScoped, etc), then as part of validating that the Decorator is also passivization capable we call into WebBeansUtil isPassivationCapableDependency(InjectionPoint injectionPoint)
That method attempts to resolve the InjectionPoint to ensure it resolves to a bean that can be passivated, but it should not attempt to do this for injection points containing @Delegate as by definition those can resolve to multiple beans. In fact, we will never even get to this point if we were not decorating a passivization capable bean.
I have a unit test that re-creates this problem, and I believe there is a very simple fix to WebBeansUtil to check for the @Delegate annotation on the injection point.