From db77f058c92ee3d0b531c474093d6a3d1d81cd25 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 26 May 2014 12:17:41 +0000
Subject: [PATCH] Ensured no accidental protocol break can happen by renaming all ByteArrayBuilder.append*() methods and getting rid of all method overloading.
---
opends/src/server/org/opends/server/replication/protocol/InitializeTargetMsg.java | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/protocol/InitializeTargetMsg.java b/opends/src/server/org/opends/server/replication/protocol/InitializeTargetMsg.java
index f528429..14495e7 100644
--- a/opends/src/server/org/opends/server/replication/protocol/InitializeTargetMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/InitializeTargetMsg.java
@@ -149,15 +149,15 @@
public byte[] getBytes(short version)
{
final ByteArrayBuilder builder = new ByteArrayBuilder();
- builder.append(MSG_TYPE_INITIALIZE_TARGET);
- builder.appendUTF8(destination);
- builder.append(baseDN);
- builder.appendUTF8(senderID);
- builder.appendUTF8(requestorID);
- builder.appendUTF8(entryCount);
+ builder.appendByte(MSG_TYPE_INITIALIZE_TARGET);
+ builder.appendIntUTF8(destination);
+ builder.appendDN(baseDN);
+ builder.appendIntUTF8(senderID);
+ builder.appendIntUTF8(requestorID);
+ builder.appendLongUTF8(entryCount);
if (version >= ProtocolVersion.REPLICATION_PROTOCOL_V4)
{
- builder.appendUTF8(initWindow);
+ builder.appendIntUTF8(initWindow);
}
return builder.toByteArray();
}
--
Gitblit v1.10.0