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

gbellato
18.20.2007 aefad4e6cfa33be9eca8cda45861d98236d0faed
opends/src/server/org/opends/server/synchronization/changelog/ChangelogDB.java
@@ -170,10 +170,6 @@
  public ChangelogCursor openReadCursor(ChangeNumber changeNumber)
                throws DatabaseException, Exception
  {
    if (changeNumber == null)
      changeNumber = readFirstChange();
    if (changeNumber == null)
      return null;
    return new ChangelogCursor(changeNumber);
  }
@@ -319,13 +315,16 @@
    {
      cursor = db.openCursor(txn, null);
      DatabaseEntry key = new ChangelogKey(startingChangeNumber);
      DatabaseEntry data = new DatabaseEntry();
      if (cursor.getSearchKey(key, data, LockMode.DEFAULT) !=
        OperationStatus.SUCCESS)
      if (startingChangeNumber != null)
      {
        throw new Exception("ChangeNumber not available");
        key = new ChangelogKey(startingChangeNumber);
        data = new DatabaseEntry();
        if (cursor.getSearchKey(key, data, LockMode.DEFAULT) !=
          OperationStatus.SUCCESS)
        {
          throw new Exception("ChangeNumber not available");
        }
      }
    }
@@ -373,7 +372,7 @@
    }
    /**
     * Get the next ChangeNumber inthe database from this Cursor.
     * Get the next ChangeNumber in the database from this Cursor.
     *
     * @return The next ChangeNumber in the database from this cursor.
     * @throws DatabaseException In case of underlying database problem.