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

coulbeck
04.34.2006 da91925d9cbce53e0f96fdbbfb1a993167719563
Remove the unused method EntryContainer#removeAllDatabases.  It is broken because it calls Environment#removeDatabase on a database with an open handle, whose documentation says "Applications should never remove databases with open Database  handles".
1 files modified
17 ■■■■■ changed files
opends/src/server/org/opends/server/backends/jeb/EntryContainer.java 17 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -205,7 +205,7 @@
    this.config = config;
    this.env = env;
    // Instantiate database and cursor lists
    // Instantiate the list of database handles.
    databases = new ArrayList<Database>();
    // Instantiate indexes for id2children and id2subtree.
@@ -3724,21 +3724,6 @@
  }
  /**
   * Remove from disk all the databases in this entryContainer.
   *
   * @throws DatabaseException If an error occurs while attempting to delete any
   * database.
   */
  private void removeAllDatabases() throws DatabaseException
  {
    for(Database database : databases)
    {
      String name = database.getDatabaseName();
      env.removeDatabase(null, name);
    }
  }
  /**
   * This method constructs a container name from a base DN. Only alphanumeric
   * characters are preserved, all other characters are replaced with an
   * underscore.