From 34b97b2d33a1196d3b22bd0ade1e758be613f7f3 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 06 Jun 2014 14:37:42 +0000
Subject: [PATCH] Ensured no accidental protocol break can happen by renaming all ByteArrayBuilder.append*() methods and getting rid of all method overloading.

---
 opendj3-server-dev/src/server/org/opends/server/replication/protocol/EntryMsg.java |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/EntryMsg.java b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/EntryMsg.java
index 6ee39ac..ebac0db 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/EntryMsg.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/EntryMsg.java
@@ -112,14 +112,14 @@
   public byte[] getBytes(short version)
   {
     final ByteArrayBuilder builder = new ByteArrayBuilder();
-    builder.append(MSG_TYPE_ENTRY);
-    builder.appendUTF8(senderID);
-    builder.appendUTF8(destination);
+    builder.appendByte(MSG_TYPE_ENTRY);
+    builder.appendIntUTF8(senderID);
+    builder.appendIntUTF8(destination);
     if (version >= ProtocolVersion.REPLICATION_PROTOCOL_V4)
     {
-      builder.appendUTF8(msgId);
+      builder.appendIntUTF8(msgId);
     }
-    builder.appendZeroTerminated(entryByteArray);
+    builder.appendZeroTerminatedByteArray(entryByteArray);
     return builder.toByteArray();
   }
 

--
Gitblit v1.10.0