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

jvergara
27.50.2009 a8473c682960919df54b936be5374d294c650cf4
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
opends/src/server/org/opends/server/backends/jeb/EntryContainer.java 5 ●●●●● patch | view | raw | blame | history
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);
  }