From eb22a02563844edb7f1f81666dd50e220893ac88 Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Tue, 29 Mar 2011 10:33:21 +0000 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-3236 - fix regression in MessageAckTest, ensure wireversion is used for marshaller test git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1086542 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/openwire/OpenWireFormat.java | 1 + .../org/apache/activemq/openwire/OpenWireFormatFactory.java | 3 +-- .../apache/activemq/openwire/DataFileGeneratorTestSupport.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java index d9375ba32e..62e269cdb0 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormat.java @@ -39,6 +39,7 @@ import org.apache.activemq.wireformat.WireFormat; public final class OpenWireFormat implements WireFormat { public static final int DEFAULT_VERSION = CommandTypes.PROTOCOL_STORE_VERSION; + public static final int DEFAULT_WIRE_VERSION = CommandTypes.PROTOCOL_VERSION; static final byte NULL_TYPE = CommandTypes.NULL; private static final int MARSHAL_CACHE_SIZE = Short.MAX_VALUE / 2; diff --git a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java index 083c155484..4b297f48f9 100755 --- a/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java +++ b/activemq-core/src/main/java/org/apache/activemq/openwire/OpenWireFormatFactory.java @@ -16,7 +16,6 @@ */ package org.apache.activemq.openwire; -import org.apache.activemq.command.CommandTypes; import org.apache.activemq.command.WireFormatInfo; import org.apache.activemq.wireformat.WireFormat; import org.apache.activemq.wireformat.WireFormatFactory; @@ -31,7 +30,7 @@ public class OpenWireFormatFactory implements WireFormatFactory { // default negotiation. // - private int version = CommandTypes.PROTOCOL_VERSION; + private int version = OpenWireFormat.DEFAULT_WIRE_VERSION; private boolean stackTraceEnabled = true; private boolean tcpNoDelayEnabled = true; private boolean cacheEnabled = true; diff --git a/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java b/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java index 85024920a5..60b31a06bf 100644 --- a/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java +++ b/activemq-core/src/test/java/org/apache/activemq/openwire/DataFileGeneratorTestSupport.java @@ -263,7 +263,7 @@ public abstract class DataFileGeneratorTestSupport extends TestSupport { OpenWireFormat wf = new OpenWireFormat(); wf.setCacheEnabled(true); wf.setStackTraceEnabled(false); - wf.setVersion(OpenWireFormat.DEFAULT_VERSION); + wf.setVersion(OpenWireFormat.DEFAULT_WIRE_VERSION); return wf; }