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

Jean-Noel Rouvignac
30.59.2014 a9de78850918773fda3a7c6fbd2c237529e39208
opendj3-server-dev/src/server/org/opends/server/replication/protocol/ModifyDNMsg.java
@@ -155,9 +155,7 @@
    }
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public ModifyDNOperation createOperation(InternalClientConnection connection,
      DN newDN) throws LDAPException, IOException
@@ -185,9 +183,7 @@
  // Msg Encoding
  // ============
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public byte[] getBytes_V1() throws UnsupportedEncodingException
  {
@@ -244,10 +240,7 @@
    return encodedMsg;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public byte[] getBytes_V23() throws UnsupportedEncodingException
  {
@@ -319,9 +312,7 @@
    return encodedMsg;
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public byte[] getBytes_V45(short reqProtocolVersion)
      throws UnsupportedEncodingException
@@ -539,37 +530,25 @@
    }
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public String toString()
  {
     if (protocolVersion == ProtocolVersion.REPLICATION_PROTOCOL_V1)
    if (protocolVersion >= ProtocolVersion.REPLICATION_PROTOCOL_V1)
    {
      return "ModifyDNMsg content: " +
        " protocolVersion: " + protocolVersion +
        " dn: " + dn +
        " changeNumber: " + csn +
        " uniqueId: " + entryUUID +
        " assuredFlag: " + assuredFlag +
        " newRDN: " + newRDN +
        " newSuperior: " + newSuperior +
        " deleteOldRdn: " + deleteOldRdn;
    }
    if (protocolVersion >= ProtocolVersion.REPLICATION_PROTOCOL_V2)
    {
      return "ModifyDNMsg content: " +
        " protocolVersion: " + protocolVersion +
        " dn: " + dn +
        " changeNumber: " + csn +
        " csn: " + csn +
        " uniqueId: " + entryUUID +
        " newRDN: " + newRDN +
        " newSuperior: " + newSuperior +
        " deleteOldRdn: " + deleteOldRdn +
        " assuredFlag: " + assuredFlag +
        " assuredMode: " + assuredMode +
        " safeDataLevel: " + safeDataLevel;
        (protocolVersion >= ProtocolVersion.REPLICATION_PROTOCOL_V2 ?
          " assuredMode: " + assuredMode +
          " safeDataLevel: " + safeDataLevel
          : "");
    }
    return "!!! Unknown version: " + protocolVersion + "!!!";
  }
@@ -670,16 +649,12 @@
   */
  private DN computeNewDN() throws DirectoryException
  {
    if (newSuperior == null)
    if (newSuperior != null)
    {
      DN parentDn = getDN().parent();
      return parentDn.child(RDN.decode(newRDN));
      return DN.valueOf(newRDN + "," + newSuperior);
    }
    else
    {
      String newStringDN = newRDN + "," + newSuperior;
      return DN.valueOf(newStringDN);
    }
    final DN parentDn = getDN().parent();
    return parentDn.child(RDN.decode(newRDN));
  }
  /**
@@ -750,9 +725,7 @@
    }
  }
  /**
   * {@inheritDoc}
   */
  /** {@inheritDoc} */
  @Override
  public int size()
  {