From 754b6fe22c8138460bd93f2b0c9d725c627163c4 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 29 Oct 2014 16:33:54 +0000
Subject: [PATCH] OPENDJ-1571 Internal Error when doing REST operations on HTTP Connection Handler

---
 opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java b/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
index be0d9a6..18f0090 100644
--- a/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
+++ b/opends/src/server/org/opends/server/replication/plugin/PersistentServerState.java
@@ -28,6 +28,7 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -59,6 +60,8 @@
     * The attribute name used to store the state in the backend.
     */
    private static final String REPLICATION_STATE = "ds-sync-state";
+  private static final LinkedHashSet<String> REPLICATION_STATE_ATTRS =
+      new LinkedHashSet<String>(Collections.singleton(REPLICATION_STATE));
 
   /**
    * Create a new PersistentServerState based on an already existing
@@ -160,7 +163,7 @@
        */
       final InternalSearchOperation search = getRootConnection().processSearch(
           baseDN, SearchScope.BASE_OBJECT, DereferencePolicy.NEVER_DEREF_ALIASES,
-          0, 0, false, filter, Collections.singleton(REPLICATION_STATE));
+          0, 0, false, filter, REPLICATION_STATE_ATTRS);
       final ResultCode resultCode = search.getResultCode();
       if (resultCode != ResultCode.SUCCESS
           && resultCode != ResultCode.NO_SUCH_OBJECT)
@@ -197,7 +200,7 @@
           DN.decode("cn=config"),
           SearchScope.SUBORDINATE_SUBTREE,
           DereferencePolicy.NEVER_DEREF_ALIASES,
-          1, 0, false, filter, Collections.singleton(REPLICATION_STATE));
+          1, 0, false, filter, REPLICATION_STATE_ATTRS);
       return getFirstResult(op);
     }
     catch (DirectoryException e)

--
Gitblit v1.10.0