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 961329a1136..e3458b77622 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(); } }