You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/07/21 03:49:33 UTC

activemq-artemis git commit: fixing Stomp::testSendWithHeartBeats

Repository: activemq-artemis
Updated Branches:
  refs/heads/master fbfdacde6 -> dcd6033e0


fixing Stomp::testSendWithHeartBeats


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

Branch: refs/heads/master
Commit: dcd6033e026ca4c2117f9e6426695c6daf645109
Parents: fbfdacd
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Jul 21 02:46:45 2015 +0100
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Jul 21 02:46:45 2015 +0100

----------------------------------------------------------------------
 .../artemis/core/protocol/stomp/v11/StompFrameV11.java      | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dcd6033e/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java
index 3f41b6d..83dc4f4 100644
--- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java
+++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/v11/StompFrameV11.java
@@ -44,6 +44,13 @@ public class StompFrameV11 extends StompFrame
    @Override
    public ActiveMQBuffer toActiveMQBuffer() throws Exception
    {
+      if (isPing())
+      {
+         // ping has some special treatment done at the super package only.
+         // on that case we will defer it to super.
+         return super.toActiveMQBuffer();
+      }
+
       if (buffer == null)
       {
          if (bytesBody != null)
@@ -66,7 +73,7 @@ public class StompFrameV11 extends StompFrame
             head.append(h.getEncodedValue());
             head.append(Stomp.NEWLINE);
          }
-         if (bytesBody != null && bytesBody.length > 0 && !hasHeader(Stomp.Headers.CONTENT_LENGTH))
+         if (bytesBody != null && bytesBody.length > 0)
          {
             head.append(Stomp.Headers.CONTENT_LENGTH);
             head.append(Stomp.Headers.SEPARATOR);