From e8cead474d5ce2b933d931f0c4743a78e68d9cfc Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 18 Aug 2015 09:39:52 +0000
Subject: [PATCH] Replaced uses of StringBuilder.append(Utils.joinAsString(String, Collection)) with the more efficient Utils.joinAsString(StringBuilder, String, Collection).

---
 opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java |   43 ++-----------------------------------------
 1 files changed, 2 insertions(+), 41 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
index 776a53e..6ba7329 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java
@@ -33,9 +33,9 @@
 import org.forgerock.opendj.io.ASN1Writer;
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.DereferenceAliasesPolicy;
-import org.opends.server.types.RawFilter;
 import org.forgerock.opendj.ldap.SearchScope;
 import org.forgerock.util.Utils;
+import org.opends.server.types.RawFilter;
 
 import static org.opends.server.protocols.ldap.LDAPConstants.*;
 import static org.opends.server.util.ServerConstants.*;
@@ -207,38 +207,18 @@
     return attributes;
   }
 
-
-
-  /**
-   * Retrieves the BER type for this protocol op.
-   *
-   * @return  The BER type for this protocol op.
-   */
   @Override
   public byte getType()
   {
     return OP_TYPE_SEARCH_REQUEST;
   }
 
-
-
-  /**
-   * Retrieves the name for this protocol op type.
-   *
-   * @return  The name for this protocol op type.
-   */
   @Override
   public String getProtocolOpName()
   {
     return "Search Request";
   }
 
-  /**
-   * Writes this protocol op to an ASN.1 output stream.
-   *
-   * @param stream The ASN.1 output stream to write to.
-   * @throws IOException If a problem occurs while writing to the stream.
-   */
   @Override
   public void write(ASN1Writer stream) throws IOException
   {
@@ -261,14 +241,6 @@
     stream.writeEndSequence();
   }
 
-
-
-  /**
-   * Appends a string representation of this LDAP protocol op to the provided
-   * buffer.
-   *
-   * @param  buffer  The buffer to which the string should be appended.
-   */
   @Override
   public void toString(StringBuilder buffer)
   {
@@ -284,22 +256,12 @@
 
     if (attributes != null && ! attributes.isEmpty())
     {
-      buffer.append(Utils.joinAsString(", ", attributes));
+      Utils.joinAsString(buffer, ", ", attributes);
     }
 
     buffer.append("})");
   }
 
-
-
-  /**
-   * Appends a multi-line string representation of this LDAP protocol op to the
-   * provided buffer.
-   *
-   * @param  buffer  The buffer to which the information should be appended.
-   * @param  indent  The number of spaces from the margin that the lines should
-   *                 be indented.
-   */
   @Override
   public void toString(StringBuilder buffer, int indent)
   {
@@ -333,4 +295,3 @@
     }
   }
 }
-

--
Gitblit v1.10.0