From 59685c84348f8d71dc3bbd3513c5eb10cc738a8e Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 03 Nov 2006 16:39:22 +0000
Subject: [PATCH] Refactor DN and RDN classes and improve their test coverage.

---
 opends/src/server/org/opends/server/tools/LDIFDiff.java |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/opends/src/server/org/opends/server/tools/LDIFDiff.java b/opends/src/server/org/opends/server/tools/LDIFDiff.java
index c1e65ab..4739c33 100644
--- a/opends/src/server/org/opends/server/tools/LDIFDiff.java
+++ b/opends/src/server/org/opends/server/tools/LDIFDiff.java
@@ -42,7 +42,6 @@
 import org.opends.server.types.AttributeType;
 import org.opends.server.types.AttributeValue;
 import org.opends.server.types.DN;
-import org.opends.server.types.DNComparator;
 import org.opends.server.types.Entry;
 import org.opends.server.types.ExistingFileBehavior;
 import org.opends.server.types.LDIFImportConfig;
@@ -277,8 +276,7 @@
       return 1;
     }
 
-    DNComparator comparator = new DNComparator();
-    TreeMap<DN,Entry> sourceMap = new TreeMap<DN,Entry>(comparator);
+    TreeMap<DN,Entry> sourceMap = new TreeMap<DN,Entry>();
     try
     {
       while (true)
@@ -324,7 +322,7 @@
       return 1;
     }
 
-    TreeMap<DN,Entry> targetMap = new TreeMap<DN,Entry>(comparator);
+    TreeMap<DN,Entry> targetMap = new TreeMap<DN,Entry>();
     try
     {
       while (true)
@@ -437,9 +435,9 @@
 
         while (true)
         {
-          // Use the DN comparator to determine the relative order of the
+          // Compare the DNs to determine the relative order of the
           // entries.
-          int comparatorValue = comparator.compare(sourceDN, targetDN);
+          int comparatorValue = sourceDN.compareTo(targetDN);
           if (comparatorValue < 0)
           {
             // The source entry should be before the target entry, which means

--
Gitblit v1.10.0