[jira] [Commented] (MYFACES-4647) PushContextImpl send - NPE when no channel found for user

2023-12-15 Thread Jira


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

Milan Siebenbürger commented on MYFACES-4647:
-

I'll provide PR to fix that.

> PushContextImpl send - NPE when no channel found for user
> -
>
> Key: MYFACES-4647
> URL: https://issues.apache.org/jira/browse/MYFACES-4647
> Project: MyFaces Core
>  Issue Type: Task
>Affects Versions: 4.0.0, 4.0.1
>Reporter: Milan Siebenbürger
>Priority: Minor
>
> When trying to send a push message to a user who has already destroyed his 
> web socket connection, PushContextImpl.send throws NPE
> java.lang.NullPointerException: Cannot invoke "java.util.Set.size()" because 
> "channelTokenSet" is null
>     at 
> org.apache.myfaces.push.cdi.PushContextImpl.send(PushContextImpl.java:134)
>     at 
> org.apache.myfaces.push.cdi.PushContextImpl.send(PushContextImpl.java:122)
> Method should be null safe, just to continue with next user identification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4647) PushContextImpl send - NPE when no channel found for user

2023-12-15 Thread Thomas Andraschko (Jira)


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

Thomas Andraschko commented on MYFACES-4647:


plz also for master (5.0)

> PushContextImpl send - NPE when no channel found for user
> -
>
> Key: MYFACES-4647
> URL: https://issues.apache.org/jira/browse/MYFACES-4647
> Project: MyFaces Core
>  Issue Type: Task
>Affects Versions: 4.0.0, 4.0.1
>Reporter: Milan Siebenbürger
>Priority: Minor
>
> When trying to send a push message to a user who has already destroyed his 
> web socket connection, PushContextImpl.send throws NPE
> java.lang.NullPointerException: Cannot invoke "java.util.Set.size()" because 
> "channelTokenSet" is null
>     at 
> org.apache.myfaces.push.cdi.PushContextImpl.send(PushContextImpl.java:134)
>     at 
> org.apache.myfaces.push.cdi.PushContextImpl.send(PushContextImpl.java:122)
> Method should be null safe, just to continue with next user identification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (MYFACES-4647) PushContextImpl send - NPE when no channel found for user

2023-12-16 Thread Jira


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

Milan Siebenbürger commented on MYFACES-4647:
-

sure, will do.

but... I noticed another problem. The PushContext api specifies how the message 
should be handled.
{code:java}
The message object will be encoded as JSON and be available as first argument 
of the JavaScript listener function declared in . {code}
This should be changed too. Do you agree? 4.1 and main (5.0) versions?

thx

> PushContextImpl send - NPE when no channel found for user
> -
>
> Key: MYFACES-4647
> URL: https://issues.apache.org/jira/browse/MYFACES-4647
> Project: MyFaces Core
>  Issue Type: Task
>Affects Versions: 4.0.0, 4.0.1
>Reporter: Milan Siebenbürger
>Priority: Minor
>
> When trying to send a push message to a user who has already destroyed his 
> web socket connection, PushContextImpl.send throws NPE
> java.lang.NullPointerException: Cannot invoke "java.util.Set.size()" because 
> "channelTokenSet" is null
>     at 
> org.apache.myfaces.push.cdi.PushContextImpl.send(PushContextImpl.java:134)
>     at 
> org.apache.myfaces.push.cdi.PushContextImpl.send(PushContextImpl.java:122)
> Method should be null safe, just to continue with next user identification.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)