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/AddMsg.java | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java
index fe549fe..867d03b 100644
--- a/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java
+++ b/opendj3-server-dev/src/server/org/opends/server/replication/protocol/AddMsg.java
@@ -189,8 +189,8 @@
public byte[] getBytes_V1()
{
final ByteArrayBuilder builder = encodeHeader_V1(MSG_TYPE_ADD_V1);
- builder.append(parentEntryUUID);
- builder.append(encodedAttributes);
+ builder.appendString(parentEntryUUID);
+ builder.appendByteArray(encodedAttributes);
return builder.toByteArray();
}
@@ -200,8 +200,8 @@
{
final ByteArrayBuilder builder =
encodeHeader(MSG_TYPE_ADD, ProtocolVersion.REPLICATION_PROTOCOL_V3);
- builder.append(parentEntryUUID);
- builder.append(encodedAttributes);
+ builder.appendString(parentEntryUUID);
+ builder.appendByteArray(encodedAttributes);
return builder.toByteArray();
}
@@ -211,11 +211,11 @@
{
final ByteArrayBuilder builder =
encodeHeader(MSG_TYPE_ADD, protocolVersion);
- builder.append(parentEntryUUID);
- builder.appendUTF8(encodedAttributes.length);
- builder.appendZeroTerminated(encodedAttributes);
- builder.appendUTF8(encodedEclIncludes.length);
- builder.appendZeroTerminated(encodedEclIncludes);
+ builder.appendString(parentEntryUUID);
+ builder.appendIntUTF8(encodedAttributes.length);
+ builder.appendZeroTerminatedByteArray(encodedAttributes);
+ builder.appendIntUTF8(encodedEclIncludes.length);
+ builder.appendZeroTerminatedByteArray(encodedEclIncludes);
return builder.toByteArray();
}
--
Gitblit v1.10.0