[ https://issues.apache.org/jira/browse/MYFACES-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17739942#comment-17739942 ]
Melloware commented on MYFACES-4612: ------------------------------------ As discussed in the PF ticket this optimization does not outweigh the side effect of removing a message from the iterator does not remove it from both collections. > Quarkus: Duplicate messages > --------------------------- > > Key: MYFACES-4612 > URL: https://issues.apache.org/jira/browse/MYFACES-4612 > Project: MyFaces Core > Issue Type: New Feature > Components: General > Affects Versions: 4.0.1 > Reporter: Melloware > Assignee: Melloware > Priority: Major > > See: [https://github.com/primefaces/primefaces/issues/10279] > > MyFaces stores the same message in two different lists and Mojarra does not: > {code:java} > _messages = new LinkedHashMap<>(5, 1f); > _orderedMessages = new ArrayList<>(); > List<FacesMessage> lst = _messages.computeIfAbsent(clientId, k -> new > ArrayList<>(3)); > lst.add(message); > _orderedMessages.add(message); {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)