yi gong updated Bug WELD-1247
Change By: yi gong (06/Nov/12 3:18 AM)
Original Estimate: 2 hours
Remaining Estimate: 2 hours
Environment: Tomcat 7 and Mojarra 2.1.3
Description: The equals() implementation is incorrect
 @Override
    public boolean equals(Object obj) {
        return this == obj || delegate().equals(obj);
    }

if the obj is a WeldMethodExpression, it returns false which cause add duplicated Listener
Please see Mojarra
javax.faces.componentUIComponentBase
    public void subscribeToEvent(Class<? extends SystemEvent> eventClass,
                                 ComponentSystemEventListener componentListener) {
...
        if (!listenersForEventClass.contains(facesLifecycleListener)) {
            listenersForEventClass.add(facesLifecycleListener);
        }

    }

Complexity: Low
Steps to Reproduce: Please use the project I upload. After package and deploy, launch the url http://localhost:8080/testjsf/faces/index.xhtml. You can see the Bean.Action is executed twice.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira