You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "melloware (via GitHub)" <gi...@apache.org> on 2023/07/11 17:49:00 UTC

[GitHub] [myfaces] melloware commented on a diff in pull request #593: MYFACES-4612: FacesMessages don't store in different collections

melloware commented on code in PR #593:
URL: https://github.com/apache/myfaces/pull/593#discussion_r1260081133


##########
impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImpl.java:
##########
@@ -208,12 +202,17 @@ public List<FacesMessage> getMessageList()
     {
         assertNotReleased();
         
-        if (_messages == null)
+        if (_messages == null || _messages.size() == 0)
         {
-            return Collections.unmodifiableList(Collections.emptyList());
+            return Collections.emptyList();

Review Comment:
   Collections.emptyList() returns an unmodifiable list by default



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@myfaces.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org