From fac789c849c153775d4d7679393c3ce3e9df9588 Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Wed, 26 Mar 2008 02:12:51 +0000
Subject: [PATCH] Partial fix for issue 3083. This fixes the problem with TestImportExport. Still looking at the initializeImport replication tests that are failing.

---
 opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java b/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java
index f8c11c2..df81ca7 100644
--- a/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java
+++ b/opends/src/server/org/opends/server/backends/jeb/importLDIF/WorkThread.java
@@ -236,7 +236,9 @@
     if (ldifImportConfig.appendToExistingData() &&
             ldifImportConfig.replaceExistingEntries()) {
       Entry existingEntry = element.getExistingEntry();
-      processIndexesEntryDelete(element, existingEntry, entryID, txn);
+      if(existingEntry != null) {
+          processIndexesEntryDelete(element, existingEntry, entryID, txn);
+      }
     }
     Map<AttributeType, AttributeIndex> attrIndexMap =
             context.getAttrIndexMap();
@@ -351,7 +353,9 @@
       if (ldifImportConfig.appendToExistingData() &&
               ldifImportConfig.replaceExistingEntries()) {
         Entry existingEntry = element.getExistingEntry();
-        dn2uri.replaceEntry(txn, existingEntry, entry);
+        if(existingEntry != null) {
+          dn2uri.replaceEntry(txn, existingEntry, entry);
+        }
       } else {
         ret= dn2uri.addEntry(txn, entry);
       }

--
Gitblit v1.10.0