From 791840ef10ecb9f25b4c3b97eacbf848bf75a261 Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Wed, 24 Apr 2013 12:44:51 +0000
Subject: [PATCH] Replication Cleanup.

---
 opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java |   13 ++++---------
 1 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java
index 050b6d9..99c16d2 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/protocol/StartECLSessionMsg.java
@@ -23,12 +23,14 @@
  *
  *
  *      Copyright 2009-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2013 ForgeRock AS.
  */
 package org.opends.server.replication.protocol;
 
 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.zip.DataFormatException;
 
 import org.opends.server.replication.common.ChangeNumber;
@@ -63,8 +65,6 @@
    */
   public final static short REQUEST_TYPE_EQUALS_REPL_CHANGE_NUMBER = 2;
 
-
-
   /**
    * This specifies that the request on the ECL is a PERSISTENT search
    * with changesOnly = false.
@@ -82,8 +82,6 @@
    */
   public final static short PERSISTENT_CHANGES_ONLY = 2;
 
-
-
   // The type of request as defined by REQUEST_TYPE_...
   private short  eclRequestType;
 
@@ -182,10 +180,7 @@
       if (excludedDNsString.length()>0)
       {
         String[] excludedDNsStr = excludedDNsString.split(";");
-        for (String excludedDNStr : excludedDNsStr)
-        {
-          this.excludedServiceIDs.add(excludedDNStr);
-        }
+        Collections.addAll(this.excludedServiceIDs, excludedDNsStr);
       }
       pos += length + 1;
 
@@ -219,7 +214,7 @@
   @Override
   public byte[] getBytes()
   {
-    String excludedSIDsString = new String();
+    String excludedSIDsString = "";
     for (String excludedServiceID : excludedServiceIDs)
     {
       excludedSIDsString = excludedSIDsString.concat(excludedServiceID+";");

--
Gitblit v1.10.0