From 459796336f95d56450c970b87575f22c871b4604 Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Fri, 10 Jun 2011 14:34:10 +0000
Subject: [PATCH] Partial fix for OPENDJ-194: Minor improvements to change log content and configuration
---
opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
index b6e75c3..7bac025 100644
--- a/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/LDAPUpdateMsg.java
@@ -352,12 +352,7 @@
throws UnsupportedEncodingException
{
// Encode in the current protocol version
- if (bytes == null)
- {
- // this is the current version of the protocol
- bytes = getBytes_V4();
- }
- return bytes;
+ return getBytes(ProtocolVersion.getCurrentVersion());
}
/**
@@ -381,7 +376,7 @@
if (bytes == null)
{
// this is the current version of the protocol
- bytes = getBytes_V4();
+ bytes = getBytes_V45(reqProtocolVersion);
}
return bytes;
}
@@ -411,15 +406,17 @@
/**
- * Get the byte array representation of this Message. This uses the version
- * 4 of the replication protocol (used for compatibility purpose).
+ * Get the byte array representation of this Message. This uses the provided
+ * version number which must be version 4 or newer.
+ * @param reqProtocolVersion TODO
*
* @return The byte array representation of this Message.
*
* @throws UnsupportedEncodingException When the encoding of the message
* failed because the UTF-8 encoding is not supported.
*/
- public abstract byte[] getBytes_V4() throws UnsupportedEncodingException;
+ public abstract byte[] getBytes_V45(short reqProtocolVersion)
+ throws UnsupportedEncodingException;
/**
--
Gitblit v1.10.0