You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2024/01/16 19:40:02 UTC

(myfaces) branch 4.1.x updated: MYFACES-4648 send without specifying user returns emptySet instead of Exception (#673)

This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch 4.1.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/4.1.x by this push:
     new 3f9623a90 MYFACES-4648 send without specifying user returns emptySet instead of Exception (#673)
3f9623a90 is described below

commit 3f9623a9071f5c0721647878b34c88c975e75d39
Author: Milan Siebenbürger <mi...@gmail.com>
AuthorDate: Tue Jan 16 20:39:57 2024 +0100

    MYFACES-4648 send without specifying user returns emptySet instead of Exception (#673)
    
    (cherry picked from commit ac3d4ee6c927a24b18b91f8a2e32d5832ad26567)
---
 impl/src/main/java/org/apache/myfaces/push/cdi/PushContextImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/push/cdi/PushContextImpl.java b/impl/src/main/java/org/apache/myfaces/push/cdi/PushContextImpl.java
index f8e50899e..586b102d8 100644
--- a/impl/src/main/java/org/apache/myfaces/push/cdi/PushContextImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/push/cdi/PushContextImpl.java
@@ -28,7 +28,6 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.Future;
 import jakarta.enterprise.inject.spi.BeanManager;
-import jakarta.faces.FacesException;
 import jakarta.faces.push.PushContext;
 import org.apache.myfaces.cdi.util.CDIUtils;
 
@@ -92,7 +91,8 @@ public class PushContextImpl implements PushContext
         }
         else
         {
-            throw new FacesException("CDI bean not found for push message");
+            // No channelToken has been opened
+            return Collections.emptySet();
         }
         
         //2. send the message