From c59836d5e2551d9ee8be2869a932487a2de17dab Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Tue, 18 Jul 2006 20:08:45 +0000
Subject: [PATCH] Mark Craig found a couple of bugs in the LDIF reader to do with rejected entries.

---
 opends/src/server/org/opends/server/util/LDIFReader.java |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/opends/src/server/org/opends/server/util/LDIFReader.java b/opends/src/server/org/opends/server/util/LDIFReader.java
index 61f268a..b5d93d0 100644
--- a/opends/src/server/org/opends/server/util/LDIFReader.java
+++ b/opends/src/server/org/opends/server/util/LDIFReader.java
@@ -241,12 +241,19 @@
            new HashMap<AttributeType,List<Attribute>>();
       HashMap<AttributeType,List<Attribute>> operationalAttributes =
            new HashMap<AttributeType,List<Attribute>>();
-      for (StringBuilder line : lines)
+      try
       {
-        readAttribute(lines, line, entryDN, objectClasses, userAttributes,
-                      operationalAttributes);
+        for (StringBuilder line : lines)
+        {
+          readAttribute(lines, line, entryDN, objectClasses, userAttributes,
+                        operationalAttributes);
+        }
       }
-
+      catch (LDIFException e)
+      {
+        entriesRejected++;
+        throw e;
+      }
 
       // Create the entry and see if it is one that should be included in the
       // import.

--
Gitblit v1.10.0