Description:
|
The equals() implementation is incorrect
{code} @Override public boolean equals(Object obj) { //my fix if (obj !=null && obj instanceof ForwardingMethodExpression){ obj=((ForwardingMethodExpression)obj).delegate(); } //my fix end return this == obj || delegate().equals(obj); } {code} If the obj is a WeldMethodExpression, it returns false which cause add duplicated listener in Mojarra 2.1
Please see Mojarra javax.faces.
componentUIComponentBase
component.UIComponentBase
{code} public void subscribeToEvent(Class<? extends SystemEvent> eventClass, ComponentSystemEventListener componentListener) { ... if (!listenersForEventClass.contains(facesLifecycleListener)) { // see here listenersForEventClass.add(facesLifecycleListener); }
} {code}
|