mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noel Rouvignac
10.18.2015 22a45835595d5a0d225cabf51797aad9ee129855
ID2entry.java:
Removed code duplication and dead code
1 files modified
27 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java 27 ●●●●● patch | view | raw | blame | history
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