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

Jean-Noel Rouvignac
18.21.2015 c55ad7c550a887b411d5ddc57ce6bd89822b02e2
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/EntryContainer.java
@@ -3163,33 +3163,20 @@
  /**
   * Clear the contents for a database from disk.
   *
   * @param txn The database transaction
   * @param database The database to clear.
   * @throws StorageRuntimeException if a JE database error occurs.
   */
  public void clearDatabase(final DatabaseContainer database) throws StorageRuntimeException
  public void clearDatabase(WriteableStorage txn, DatabaseContainer database) throws StorageRuntimeException
  {
    database.close();
    try
    {
      storage.write(new WriteOperation()
      {
        @Override
        public void run(WriteableStorage txn) throws Exception
        {
          try
          {
            txn.deleteTree(database.getName());
          }
          finally
          {
            database.open(txn);
          }
        }
      });
      txn.deleteTree(database.getName());
    }
    catch (Exception e)
    finally
    {
      throw new StorageRuntimeException(e);
      database.open(txn);
    }
    if(logger.isTraceEnabled())
    {