From ba07fc549fdcfe6d30524daf17ad33832b0efc75 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 11 Mar 2014 09:18:47 +0000
Subject: [PATCH] EntryContainer.java: Matt said we can get rid of the KeyReverseComparator: "It is not used any more, but has been kept for backwards compatibility with OpenDS 2.2 (the comparator is persisted in the JE database)"
---
opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java | 52 ----------------------------------------------------
1 files changed, 0 insertions(+), 52 deletions(-)
diff --git a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
index 7cc4e61..8751eb8 100644
--- a/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opendj3-server-dev/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -2863,58 +2863,6 @@
}
/**
- * A lexicographic byte array comparator that compares in
- * reverse byte order. This is used for the dn2id database of version 2.2.
- * If we want to find all the entries in a subtree dc=com we know that
- * all subordinate entries must have ,dc=com as a common suffix. In reversing
- * the order of comparison we turn the subtree base into a common prefix
- * and are able to iterate through the keys having that prefix.
- * Keep in there to preserve ability to upgrade
- */
- static public class KeyReverseComparator implements Comparator<byte[]>
- {
- /**
- * Compares its two arguments for order. Returns a negative integer,
- * zero, or a positive integer as the first argument is less than, equal
- * to, or greater than the second.
- *
- * @param a the first object to be compared.
- * @param b the second object to be compared.
- * @return a negative integer, zero, or a positive integer as the
- * first argument is less than, equal to, or greater than the
- * second.
- */
- @Override
- public int compare(byte[] a, byte[] b)
- {
- for (int ai = a.length - 1, bi = b.length - 1;
- ai >= 0 && bi >= 0; ai--, bi--)
- {
- if (a[ai] > b[bi])
- {
- return 1;
- }
- else if (a[ai] < b[bi])
- {
- return -1;
- }
- }
- if (a.length == b.length)
- {
- return 0;
- }
- if (a.length > b.length)
- {
- return 1;
- }
- else
- {
- return -1;
- }
- }
- }
-
- /**
* Insert a new entry into the attribute indexes.
*
* @param txn The database transaction to be used for the updates.
--
Gitblit v1.10.0