Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2015-01-08 19:06:53 +0000
committerJoakim Erdfelt2015-01-08 19:06:53 +0000
commitf7b382064f05de2c2176e313db25ddf52dde66e9 (patch)
tree9195a07721e9656d3efaa301155a38a7234d19aa /jetty-websocket/websocket-api/src
parent51aafc78a40304afb1eca73ecdfac50533e1f3b7 (diff)
downloadorg.eclipse.jetty.project-f7b382064f05de2c2176e313db25ddf52dde66e9.tar.gz
org.eclipse.jetty.project-f7b382064f05de2c2176e313db25ddf52dde66e9.tar.xz
org.eclipse.jetty.project-f7b382064f05de2c2176e313db25ddf52dde66e9.zip
457017 - Reflective call to websocket methods that fail have ambiguous
exceptions + Making JSR onOpen close and use onError properly, as well we unwrapping the InvocationTargetException cause as to WHY the call to onOpen failed.
Diffstat (limited to 'jetty-websocket/websocket-api/src')
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/CloseStatus.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/CloseStatus.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/CloseStatus.java
index bb80403673..417221e926 100644
--- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/CloseStatus.java
+++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/CloseStatus.java
@@ -32,6 +32,11 @@ public class CloseStatus
*/
public static String trimMaxReasonLength(String reason)
{
+ if (reason == null)
+ {
+ return null;
+ }
+
if (reason.length() > MAX_REASON_PHRASE)
{
return reason.substring(0,MAX_REASON_PHRASE);

Back to the top