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:39:47 UTC

(myfaces) branch main updated: MYFACES-4648 send without specifying user returns emptySet instead of Exception (#671)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 4652df2b9 MYFACES-4648 send without specifying user returns emptySet instead of Exception (#671)
4652df2b9 is described below

commit 4652df2b9ddace495083dc12c7407ee8d1c454de
Author: Milan Siebenbürger <mi...@gmail.com>
AuthorDate: Tue Jan 16 20:39:41 2024 +0100

    MYFACES-4648 send without specifying user returns emptySet instead of Exception (#671)
---
 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