You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2017/03/23 14:04:57 UTC

activemq-artemis git commit: ARTEMIS-1056 Fixing AutomaticColocatedQuorumVoteTest

Repository: activemq-artemis
Updated Branches:
  refs/heads/master a03c61fc7 -> 633b9c75d


ARTEMIS-1056 Fixing AutomaticColocatedQuorumVoteTest


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

Branch: refs/heads/master
Commit: 633b9c75dd181e9c664c33256d7b2ba6503b2bc0
Parents: a03c61f
Author: Clebert Suconic <cl...@apache.org>
Authored: Thu Mar 23 09:35:17 2017 -0400
Committer: Martyn Taylor <mt...@redhat.com>
Committed: Thu Mar 23 14:04:26 2017 +0000

----------------------------------------------------------------------
 .../core/protocol/core/impl/wireformat/QuorumVoteMessage.java    | 4 +++-
 .../protocol/core/impl/wireformat/QuorumVoteReplyMessage.java    | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/633b9c75/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteMessage.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteMessage.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteMessage.java
index 78ebcb9..435514b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteMessage.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteMessage.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
+import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 import org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteHandler;
@@ -57,7 +58,8 @@ public class QuorumVoteMessage extends PacketImpl {
    public void decodeRest(ActiveMQBuffer buffer) {
       super.decodeRest(buffer);
       handler = buffer.readSimpleString();
-      voteBuffer = buffer.readSlice(buffer.readableBytes());
+      voteBuffer = ActiveMQBuffers.fixedBuffer(buffer.readableBytes());
+      buffer.readBytes(voteBuffer);
    }
 
    public SimpleString getHandler() {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/633b9c75/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java
index ff0609c..8a4f091 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QuorumVoteReplyMessage.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.core.protocol.core.impl.wireformat;
 
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
+import org.apache.activemq.artemis.api.core.ActiveMQBuffers;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.protocol.core.impl.PacketImpl;
 import org.apache.activemq.artemis.core.server.cluster.qourum.QuorumVoteHandler;
@@ -62,7 +63,8 @@ public class QuorumVoteReplyMessage extends PacketImpl {
    public void decodeRest(ActiveMQBuffer buffer) {
       super.decodeRest(buffer);
       handler = buffer.readSimpleString();
-      voteBuffer = buffer.readSlice(buffer.readableBytes());
+      voteBuffer = ActiveMQBuffers.fixedBuffer(buffer.readableBytes());
+      buffer.readBytes(voteBuffer);
    }
 
    public void decodeRest(QuorumVoteHandler voteHandler) {