Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-12-17 17:31:50 -0500
committerJoakim Erdfelt2015-12-17 17:31:50 -0500
commit5f27a62aae0bccb5b2630015a5d14d77d2cdf91d (patch)
tree31b0106e1f47558666cb120e73f4099f01d71089
parente6901b26467d80d9101c74f3d26cfed89f0453d7 (diff)
downloadorg.eclipse.jetty.project-5f27a62aae0bccb5b2630015a5d14d77d2cdf91d.tar.gz
org.eclipse.jetty.project-5f27a62aae0bccb5b2630015a5d14d77d2cdf91d.tar.xz
org.eclipse.jetty.project-5f27a62aae0bccb5b2630015a5d14d77d2cdf91d.zip
484397 - Unavoidable NullPointerException in onMessage-Handler for PongMessages
-rw-r--r--jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrPongMessage.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrPongMessage.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrPongMessage.java
index 961329a113..e3458b7762 100644
--- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrPongMessage.java
+++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrPongMessage.java
@@ -22,6 +22,8 @@ import java.nio.ByteBuffer;
import javax.websocket.PongMessage;
+import org.eclipse.jetty.util.BufferUtil;
+
public class JsrPongMessage implements PongMessage
{
private final ByteBuffer data;
@@ -34,6 +36,10 @@ public class JsrPongMessage implements PongMessage
@Override
public ByteBuffer getApplicationData()
{
+ if (data == null)
+ {
+ return BufferUtil.EMPTY_BUFFER;
+ }
return data.slice();
}
}

Back to the top