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

jvergara
27.50.2009 69e65a37e6a9d1733b71af98f78ef9d918633147
Fix for issue 3455 (error when deleting vlv index)

The problem is caused because VLVIndex.close() is called twice. VLVIndex.close() basically calls DatabaseContainer.close(), and calling it twice generates a NullPointerException (the database object is set to null when close() is called).

The fix consists on removing the first explicit call to VLVIndex.close (the next call to deleteDatabase(VLVIndex) will call VLVIndex.close).
1 files modified
5 ■■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java 5 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -22,7 +22,7 @@
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2008 Sun Microsystems, Inc.
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.server.backends.jeb;
import org.opends.messages.Message;
@@ -424,7 +424,6 @@
      {
        VLVIndex vlvIndex =
          vlvIndexMap.get(cfg.getName().toLowerCase());
        vlvIndex.close();
        deleteDatabase(vlvIndex);
        vlvIndexMap.remove(cfg.getName());
      }
@@ -641,7 +640,7 @@
    config.removeLocalDBChangeListener(this);
    config.removeLocalDBIndexAddListener(attributeJEIndexCfgManager);
    config.removeLocalDBIndexDeleteListener(attributeJEIndexCfgManager);
    config.removeLocalDBVLVIndexDeleteListener(vlvJEIndexCfgManager);
    config.removeLocalDBVLVIndexAddListener(vlvJEIndexCfgManager);
    config.removeLocalDBVLVIndexDeleteListener(vlvJEIndexCfgManager);
  }