Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Erdfelt2013-09-12 22:25:02 +0000
committerJoakim Erdfelt2013-09-12 22:25:02 +0000
commit7f8584266688ea49eb99e9b8af10d939e7d9ed4f (patch)
tree16a78fc2516f0f271f84559b2169be44d5053dc7 /jetty-websocket/websocket-api/src
parent5445c42ffea4bb054a436504b3c3f645fa363f66 (diff)
downloadorg.eclipse.jetty.project-7f8584266688ea49eb99e9b8af10d939e7d9ed4f.tar.gz
org.eclipse.jetty.project-7f8584266688ea49eb99e9b8af10d939e7d9ed4f.tar.xz
org.eclipse.jetty.project-7f8584266688ea49eb99e9b8af10d939e7d9ed4f.zip
417134 - WebSocket / Jsr ServerEndpointConfig.Configurator.getNegotiatedExtensions() is never used
+ Extensions pre-negotiated via ServerEndpointConfig.Configurator.getNegotiatedExtensions are not properly handled. + Added JsrBrowserDebugTool (Jsr version of BrowserDebugTool)
Diffstat (limited to 'jetty-websocket/websocket-api/src')
-rw-r--r--jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java29
1 files changed, 28 insertions, 1 deletions
diff --git a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java
index 2e17cef9b3..eed6f20ed1 100644
--- a/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java
+++ b/jetty-websocket/websocket-api/src/main/java/org/eclipse/jetty/websocket/api/util/QuoteUtil.java
@@ -18,8 +18,8 @@
package org.eclipse.jetty.websocket.api.util;
-import java.io.IOException;
import java.util.Arrays;
+import java.util.Collection;
import java.util.Iterator;
import java.util.NoSuchElementException;
@@ -473,4 +473,31 @@ public class QuoteUtil
}
return ret.toString();
}
+
+ public static String join(Collection<?> objs, String delim)
+ {
+ if (objs == null)
+ {
+ return "";
+ }
+ StringBuilder ret = new StringBuilder();
+ boolean needDelim = false;
+ for (Object obj : objs)
+ {
+ if (needDelim)
+ {
+ ret.append(delim);
+ }
+ if (obj instanceof String)
+ {
+ ret.append('"').append(obj).append('"');
+ }
+ else
+ {
+ ret.append(obj);
+ }
+ needDelim = true;
+ }
+ return ret.toString();
+ }
}

Back to the top