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

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