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

Fabio Pistolesi
13.31.2015 917ee8bbe840e706075b278b3577bd112a0f8059
Following Jean-Noel suggestion (thank you, btw), replace an expensive operation with a simpler one.
1 files modified
6 ■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java 6 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ID2Entry.java
@@ -235,7 +235,11 @@
  void open0(WriteableTransaction txn) throws StorageRuntimeException
  {
    // Make sure the tree is there and readable, even if the storage is READ_ONLY.
    txn.getRecordCount(getName());
    // Would be nice if there were a better way...
    try (final Cursor<ByteString, ByteString> cursor = txn.openCursor(getName()))
    {
      cursor.next();
    }
  }
  /**