From 3d79ba1c83df1be51983cb4ef719834aa368b61d Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Thu, 23 Jun 2011 08:41:21 +0000
Subject: [PATCH] Fix issue OPENDJ-213. Processing of the string based cookie was not handling errors consistently, as code was duplicated between the constructor and another parsing method. The fix required some minor refactoring. All nightlytests have been successfully passing on my development machine.
---
opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
index 3ba19c3..e1d8b2b 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/replication/server/ECLServerHandler.java
@@ -37,6 +37,7 @@
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.Map;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.zip.DataFormatException;
@@ -696,7 +697,7 @@
// At the end, normally the map should be empty.
// Depending on allowUnknownDomains provided flag, a non empty map will
// be considered as an error when allowUnknownDomains is false.
- HashMap<String,ServerState> startStatesFromProvidedCookie =
+ Map<String,ServerState> startStatesFromProvidedCookie =
new HashMap<String,ServerState>();
ReplicationServer rs = this.replicationServer;
@@ -1053,7 +1054,7 @@
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
throw new DirectoryException(
- ResultCode.UNWILLING_TO_PERFORM,
+ ResultCode.PROTOCOL_ERROR,
ERR_INVALID_COOKIE_SYNTAX.get());
}
--
Gitblit v1.10.0