You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2020/08/24 13:22:18 UTC

[wicket] branch master updated: WICKET-6818 NullPointerException in WicketEndpoint onClose

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

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 3b4c605  WICKET-6818 NullPointerException in WicketEndpoint onClose
3b4c605 is described below

commit 3b4c6058a51d564f8f0510c01408a9311f20d47d
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Aug 24 16:21:12 2020 +0300

    WICKET-6818 NullPointerException in WicketEndpoint onClose
---
 .../main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java b/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java
index dcacd6b..0636831 100644
--- a/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java
+++ b/wicket-native-websocket/wicket-native-websocket-javax/src/main/java/org/apache/wicket/protocol/ws/javax/WicketEndpoint.java
@@ -82,7 +82,7 @@ public class WicketEndpoint extends Endpoint
 		LOG.debug("Web Socket connection with id '{}' has been closed with code '{}' and reason: {}",
 				session.getId(), closeCode, reasonPhrase);
 
-		if (isApplicationAlive())
+		if (isApplicationAlive() && javaxWebSocketProcessor != null)
 		{
 			javaxWebSocketProcessor.onClose(closeCode, reasonPhrase);
 		}
@@ -102,7 +102,7 @@ public class WicketEndpoint extends Endpoint
 
 		super.onError(session, t);
 
-		if (isApplicationAlive())
+		if (isApplicationAlive() && javaxWebSocketProcessor != null)
 		{
 			javaxWebSocketProcessor.onError(t);
 		}