[jira] [Commented] (MYFACES-4612) Quarkus: Duplicate messages

2023-07-04 Thread Melloware (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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 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)


[jira] [Commented] (MYFACES-4612) Quarkus: Duplicate messages

2023-07-03 Thread Melloware (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17739741#comment-17739741
 ] 

Melloware commented on MYFACES-4612:


OK so in PrettyFaces the old code was doing this..
{code:java}
 for (Iterator iter = facesContext.getMessages(null); 
iter.hasNext(); ) {
messages.add(iter.next());
iter.remove();
} {code}
Expecting that would remove all global messages but since MyFaces stores things 
in 2 different collection the other "Ordered" messages collection is never 
touched.  in Mojarra its one collection so this works.

> 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 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)


[jira] [Commented] (MYFACES-4612) Quarkus: Duplicate messages

2023-07-03 Thread Thomas Andraschko (Jira)


[ 
https://issues.apache.org/jira/browse/MYFACES-4612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17739712#comment-17739712
 ] 

Thomas Andraschko commented on MYFACES-4612:


Thats a optimization, we just leave that and just fix the bug

> 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 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)