activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kea...@apache.org
Subject git commit: Fix for AMQ-4857, added test for null before accessing protocol string
Date Fri, 08 Nov 2013 17:04:04 GMT
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 <kevin@kevinearls.com>
Authored: Fri Nov 8 18:03:56 2013 +0100
Committer: Kevin Earls <kevin@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();


Mime
View raw message