Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.0
Description
The CDI Spec says "During the application initialization process, the container fires a series of events, allowing portable extensions to integrate with the container initialization process".
In OWB, Interceptors added programatically during these lifecycle events are NOT added to our interceptor stack in org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl.addBean(Bean<?>).
In org.apache.webbeans.portable.events.discovery.AfterBeanDiscoveryImpl.addBean(Bean<?>) we create a CustomInterceptor that wraps the passed interceptor. We then add this CustomInterceptor to a set of org.apache.webbeans.container.BeanManagerImpl.webBeansInterceptors.
Unfortunately multiple CustomInterceptor instances evaluate to the same hashcode and different interceptors overwrite one another when they get added to the Set. Consequently the right set of interceptors does not fire when a managed bean is to be intercepted.
The fix to this issue is for CustomInterceptor and WebBeansInterceptor to override the default equals and hashcode methods.
This bug causes 6 tests of the org.jboss.jsr299.tck.tests.interceptors.definition.custom.CustomInterceptorTest to FAIL.