From 22a45835595d5a0d225cabf51797aad9ee129855 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 10 Jul 2015 10:18:39 +0000
Subject: [PATCH] ID2entry.java: Removed code duplication and dead code
---
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java | 27 +--------------------------
1 files changed, 1 insertions(+), 26 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java
index 9e49a68..e049366 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java
@@ -48,7 +48,6 @@
import org.forgerock.util.Reject;
import org.opends.server.api.CompressedSchema;
import org.opends.server.backends.pluggable.spi.Cursor;
-import org.opends.server.backends.pluggable.spi.Importer;
import org.opends.server.backends.pluggable.spi.ReadableTransaction;
import org.opends.server.backends.pluggable.spi.StorageRuntimeException;
import org.opends.server.backends.pluggable.spi.TreeName;
@@ -306,15 +305,7 @@
}
ByteString encode(Entry entry) throws DirectoryException {
- final EntryCodec codec = acquireEntryCodec();
- try
- {
- return codec.encode(entry, dataConfig);
- }
- finally
- {
- codec.release();
- }
+ return entryToDatabase(entry, dataConfig);
}
/**
@@ -342,22 +333,6 @@
}
/**
- * Write a record in the entry tree.
- *
- * @param importer a non null importer
- * @param id The entry ID which forms the key.
- * @param entry The LDAP entry.
- * @throws StorageRuntimeException If an error occurs in the storage.
- * @throws DirectoryException If a problem occurs while attempting to encode the entry.
- */
- public void importPut(Importer importer, EntryID id, Entry entry)
- throws StorageRuntimeException, DirectoryException
- {
- Reject.ifNull(importer, "importer must not be null.");
- importer.put(getName(), id.toByteString(), encode(entry));
- }
-
- /**
* Remove a record from the entry tree.
*
* @param txn a non null transaction
--
Gitblit v1.10.0