From d0513ecbe63be83f92fcc69fbc0cc43d8745a458 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Tue, 20 Jun 2017 13:40:05 -0700 Subject: [PATCH] Restoring JSR356 Session.setMax*MessageBufferSize() spec behavior --- .../jetty/websocket/jsr356/JsrSession.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrSession.java b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrSession.java index dfbe55e7943..56dc11981b1 100644 --- a/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrSession.java +++ b/jetty-websocket/javax-websocket-client-impl/src/main/java/org/eclipse/jetty/websocket/jsr356/JsrSession.java @@ -337,11 +337,16 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess getJsrEndpointFunctions().removeMessageHandler(handler); } } - + + /** + * Maximum size of a whole BINARY message that this implementation can buffer. + * + * @param length the length in bytes + */ @Override public void setMaxBinaryMessageBufferSize(int length) { - getPolicy().setMaxBinaryMessageBufferSize(length); + getPolicy().setMaxBinaryMessageSize(length); } @Override @@ -350,11 +355,16 @@ public class JsrSession extends WebSocketSession implements javax.websocket.Sess getPolicy().setIdleTimeout(milliseconds); super.setIdleTimeout(milliseconds); } - + + /** + * Maximum size of a whole TEXT message that this implementation can buffer. + * + * @param length the length in bytes + */ @Override public void setMaxTextMessageBufferSize(int length) { - getPolicy().setMaxTextMessageBufferSize(length); + getPolicy().setMaxTextMessageSize(length); } public void setPathParameters(Map pathParams)