From a41662c1136b2bb4a4198df89e0e87d2be3ef099 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 16 Jul 2015 14:57:56 +0000
Subject: [PATCH] AutoRefactor'ed simplify expressions
---
opendj-server-legacy/src/main/java/org/opends/server/protocols/ldap/SearchRequestProtocolOp.java | 13 +++----------
1 files changed, 3 insertions(+), 10 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 f146611..776a53e 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
@@ -27,7 +27,6 @@
package org.opends.server.protocols.ldap;
import java.io.IOException;
-import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
@@ -36,6 +35,7 @@
import org.forgerock.opendj.ldap.DereferenceAliasesPolicy;
import org.opends.server.types.RawFilter;
import org.forgerock.opendj.ldap.SearchScope;
+import org.forgerock.util.Utils;
import static org.opends.server.protocols.ldap.LDAPConstants.*;
import static org.opends.server.util.ServerConstants.*;
@@ -282,16 +282,9 @@
filter.toString(buffer);
buffer.append(", attributes={");
- if ((attributes != null) && (! attributes.isEmpty()))
+ if (attributes != null && ! attributes.isEmpty())
{
- Iterator<String> iterator = attributes.iterator();
- buffer.append(iterator.next());
-
- while (iterator.hasNext())
- {
- buffer.append(", ");
- buffer.append(iterator.next());
- }
+ buffer.append(Utils.joinAsString(", ", attributes));
}
buffer.append("})");
--
Gitblit v1.10.0