From a8c545bf696bc38284507b96e38c9f38d5b28fab Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Mon, 3 Aug 2009 13:24:29 +0000 Subject: QPID-2002 : Change CON-1001 to make client ID optional so that the various stages of Open can be correctly logged. Client ID is not initially provided so we would be unable to log the protocol negotiation without removing this Modified ProtocolVersion Template to include a toString value to make it easier to log. There are two templates to update one in gentools/templ.java and one in common/templates Exposed verification methods to allow systests to reuse the code git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@800363 13f79535-47bb-0310-9956-ffa450edef68 --- java/common/templates/model/ProtocolVersionListClass.vm | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'java/common/templates/model/ProtocolVersionListClass.vm') diff --git a/java/common/templates/model/ProtocolVersionListClass.vm b/java/common/templates/model/ProtocolVersionListClass.vm index 9ac6adfdf5..d3e943e36f 100644 --- a/java/common/templates/model/ProtocolVersionListClass.vm +++ b/java/common/templates/model/ProtocolVersionListClass.vm @@ -41,12 +41,14 @@ public class ProtocolVersion implements Comparable { private final byte _majorVersion; private final byte _minorVersion; + private final String _stringFormat; public ProtocolVersion(byte majorVersion, byte minorVersion) { _majorVersion = majorVersion; _minorVersion = minorVersion; + _stringFormat = _majorVersion+"-"+_minorVersion; } public byte getMajorVersion() @@ -59,6 +61,11 @@ public class ProtocolVersion implements Comparable return _minorVersion; } + public String toString() + { + return _stringFormat; + } + public int compareTo(Object o) { -- cgit v1.2.1