From 45eb21b1354b6925fc058f834f505a9699d1bbbe Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Wed, 10 Jun 2009 08:43:50 +0000
Subject: [PATCH] External Changelog - first step - related issues 495, 519
---
opends/src/server/org/opends/server/replication/common/ServerState.java | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/common/ServerState.java b/opends/src/server/org/opends/server/replication/common/ServerState.java
index 0eac1cf..bf7565b 100644
--- a/opends/src/server/org/opends/server/replication/common/ServerState.java
+++ b/opends/src/server/org/opends/server/replication/common/ServerState.java
@@ -122,6 +122,8 @@
/**
* Get the length of the next String encoded in the in byte array.
+ * This method is used to cut the different parts (server ids, change number)
+ * of a server state.
*
* @param in the byte array where to calculate the string.
* @param pos the position whre to start from in the byte array.
@@ -135,7 +137,7 @@
while (in[offset++] != 0)
{
if (offset >= in.length)
- throw new DataFormatException("byte[] is not a valid modify msg");
+ throw new DataFormatException("byte[] is not a valid server state");
length++;
}
return length;
@@ -251,7 +253,6 @@
* Return the text representation of ServerState.
* @return the text representation of ServerState
*/
- @Override
public String toString()
{
StringBuilder buffer = new StringBuilder();
@@ -261,9 +262,11 @@
for (Short key : list.keySet())
{
ChangeNumber change = list.get(key);
+ buffer.append(change.toString());
buffer.append(" ");
- buffer.append(change.toStringUI());
}
+ if (!list.isEmpty())
+ buffer.deleteCharAt(buffer.length()-1);
}
return buffer.toString();
--
Gitblit v1.10.0