From 44569a077cf6c6bda9e27713a4e2ba1a2cfaa18c Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Thu, 03 Feb 2011 13:07:44 +0000
Subject: [PATCH] IN PROGRESS - issue OPENDJ-23: Exception while replaying a delete operation using assured replication. https://bugster.forgerock.org/jira/browse/OPENDJ-23
---
opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPFilter.java | 9 ++++++++-
opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java | 12 +++---------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
index 5ac41d8..29e756b 100644
--- a/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
+++ b/opends/src/server/org/opends/server/replication/plugin/LDAPReplicationDomain.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2010 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.server.replication.plugin;
@@ -2474,15 +2475,8 @@
return;
}
- LDAPFilter filter = null;
- try
- {
- filter = LDAPFilter.decode(
- DS_SYNC_CONFLICT + "=" + freedDN.toNormalizedString());
- } catch (LDAPException e)
- {
- // Not possible. We know the filter just above is correct.
- }
+ LDAPFilter filter = LDAPFilter.createEqualityFilter(DS_SYNC_CONFLICT,
+ ByteString.valueOf(freedDN.toString()));
LinkedHashSet<String> attrs = new LinkedHashSet<String>(1);
attrs.add(EntryHistorical.HISTORICALATTRIBUTENAME);
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPFilter.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPFilter.java
index 4fc3016..d4a97f4 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPFilter.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/protocols/ldap/TestLDAPFilter.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2008 Sun Microsystems, Inc.
+ * Portions Copyright 2011 ForgeRock AS
*/
package org.opends.server.protocols.ldap;
@@ -190,7 +191,13 @@
{ "(|(givenName=\\5cJo\\2a\\28\\29*\\5cn\\2a\\28\\29)(cn:2.4.6.8.19:=\\5cJohn\\2a \\28Doe\\29)" +
"(&(objectClass=\\5ctest\\2a\\28Value\\29)(sn~=\\5ctest\\2a\\28Value\\29)))",
- LDAPFilter.createORFilter(list2) }
+ LDAPFilter.createORFilter(list2) },
+
+ // OpenDJ issue 23.
+ {
+ "(ds-sync-conflict=uid=\\5c+3904211775265,ou=SharedAddressBook,cn=1038372,dc=cab)",
+ LDAPFilter.createEqualityFilter("ds-sync-conflict",
+ ByteString.valueOf("uid=\\+3904211775265,ou=SharedAddressBook,cn=1038372,dc=cab")) }
};
}
--
Gitblit v1.10.0