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

Jean-Noel Rouvignac
16.57.2015 a41662c1136b2bb4a4198df89e0e87d2be3ef099
opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchResultDoneProtocolOp.java
@@ -25,22 +25,20 @@
 *      Portions Copyright 2014-2015 ForgeRock AS
 */
package org.opends.server.protocols.ldap;
import org.forgerock.i18n.LocalizableMessage;
import java.util.Iterator;
import java.util.List;
import java.io.IOException;
import org.forgerock.opendj.io.*;
import org.forgerock.util.Utils;
import org.opends.server.types.DN;
import org.forgerock.i18n.slf4j.LocalizedLogger;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
import static org.opends.server.util.ServerConstants.*;
/**
 * This class defines the structures and methods for an LDAP search result done
 * protocol op, which is used to provide information about the result of
@@ -220,7 +218,7 @@
      stream.writeOctetString(errorMessage.toString());
    }
    if ((referralURLs != null) && (! referralURLs.isEmpty()))
    if (referralURLs != null && !referralURLs.isEmpty())
    {
      stream.writeStartSequence(TYPE_REFERRAL_SEQUENCE);
      for (String s : referralURLs)
@@ -246,31 +244,20 @@
    buffer.append("SearchResultDone(resultCode=");
    buffer.append(resultCode);
    if ((errorMessage != null) && (errorMessage.length() > 0))
    if (errorMessage != null && errorMessage.length() > 0)
    {
      buffer.append(", errorMessage=");
      buffer.append(errorMessage);
    }
    if (matchedDN != null)
    {
      buffer.append(", matchedDN=");
      buffer.append(matchedDN);
    }
    if ((referralURLs != null) && (! referralURLs.isEmpty()))
    if (referralURLs != null && !referralURLs.isEmpty())
    {
      buffer.append(", referralURLs={");
      Iterator<String> iterator = referralURLs.iterator();
      buffer.append(iterator.next());
      while (iterator.hasNext())
      {
        buffer.append(", ");
        buffer.append(iterator.next());
      }
      buffer.append(Utils.joinAsString(", ", referralURLs));
      buffer.append("}");
    }
@@ -320,7 +307,7 @@
      buffer.append(EOL);
    }
    if ((referralURLs != null) && (! referralURLs.isEmpty()))
    if (referralURLs != null && ! referralURLs.isEmpty())
    {
      buffer.append(indentBuf);
      buffer.append("  Referral URLs:  ");