mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

pgamba
10.43.2009 ccc4127f23f63214f4dc2f94d26a021a3ec2eec6
opendj-sdk/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();