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/ECLUpdateMsg.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/protocol/ECLUpdateMsg.java b/opends/src/server/org/opends/server/replication/protocol/ECLUpdateMsg.java
index 2173135..cebf245 100644
--- a/opends/src/server/org/opends/server/replication/protocol/ECLUpdateMsg.java
+++ b/opends/src/server/org/opends/server/replication/protocol/ECLUpdateMsg.java
@@ -154,13 +154,13 @@
   public byte[] getBytes(short protocolVersion)
   {
     final ByteArrayBuilder builder = new ByteArrayBuilder();
-    builder.append(MSG_TYPE_ECL_UPDATE);
-    builder.append(String.valueOf(cookie));
-    builder.append(baseDN);
+    builder.appendByte(MSG_TYPE_ECL_UPDATE);
+    builder.appendString(String.valueOf(cookie));
+    builder.appendDN(baseDN);
     // FIXME JNR Changing the line below to use long would require a protocol
     // version change. Leave it like this for now until the need arises.
-    builder.appendUTF8((int) changeNumber);
-    builder.appendZeroTerminated(updateMsg.getBytes(protocolVersion));
+    builder.appendIntUTF8((int) changeNumber);
+    builder.appendZeroTerminatedByteArray(updateMsg.getBytes(protocolVersion));
     return builder.toByteArray();
   }
 

--
Gitblit v1.10.0