You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ke...@apache.org on 2013/11/08 18:04:04 UTC

git commit: Fix for AMQ-4857, added test for null before accessing protocol string

Updated Branches:
  refs/heads/trunk 42e1c463d -> 692428eee


Fix for AMQ-4857, added test for null before accessing protocol string


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/692428ee
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/692428ee
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/692428ee

Branch: refs/heads/trunk
Commit: 692428eee5f7af1118881c1140ff45cd33e99d18
Parents: 42e1c46
Author: Kevin Earls <ke...@kevinearls.com>
Authored: Fri Nov 8 18:03:56 2013 +0100
Committer: Kevin Earls <ke...@kevinearls.com>
Committed: Fri Nov 8 18:03:56 2013 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/transport/ws/WSServlet.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/692428ee/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSServlet.java
----------------------------------------------------------------------
diff --git a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSServlet.java b/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSServlet.java
index f5ace83..d0ed22d 100644
--- a/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSServlet.java
+++ b/activemq-http/src/main/java/org/apache/activemq/transport/ws/WSServlet.java
@@ -51,7 +51,7 @@ public class WSServlet extends WebSocketServlet {
     @Override
     public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol) {
         WebSocket socket;
-        if (protocol.startsWith("mqtt")) {
+        if (protocol != null && protocol.startsWith("mqtt")) {
             socket = new MQTTSocket();
         } else {
             socket = new StompSocket();