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

Jean-Noel Rouvignac
14.30.2013 0a51f5fbeb5e99c52f1be8973ae656de34fab75f
opends/src/server/org/opends/server/replication/server/changelog/je/JEReplicationIterator.java
@@ -32,8 +32,7 @@
import org.opends.server.replication.protocol.UpdateMsg;
import org.opends.server.replication.server.changelog.api.ChangelogException;
import org.opends.server.replication.server.changelog.api.ReplicationIterator;
import org.opends.server.replication.server.changelog.je.ReplicationDB
    .ReplServerDBCursor;
import org.opends.server.replication.server.changelog.je.ReplicationDB.*;
/**
 * Berkeley DB JE implementation of IReplicationIterator.
@@ -52,20 +51,20 @@
   * releaseCursor() method.
   *
   * @param db The db where the iterator must be created.
   * @param changeNumber The ChangeNumber after which the iterator must start.
   * @param startAfterCN The ChangeNumber after which the iterator must start.
   * @param dbHandler The associated DbHandler.
   * @throws ChangelogException if a database problem happened.
   */
  public JEReplicationIterator(ReplicationDB db, ChangeNumber changeNumber,
  public JEReplicationIterator(ReplicationDB db, ChangeNumber startAfterCN,
      DbHandler dbHandler) throws ChangelogException
  {
    this.db = db;
    this.dbHandler = dbHandler;
    this.lastNonNullCurrentCN = changeNumber;
    this.lastNonNullCurrentCN = startAfterCN;
    try
    {
      cursor = db.openReadCursor(changeNumber);
      cursor = db.openReadCursor(startAfterCN);
    }
    catch(Exception e)
    {
@@ -79,7 +78,7 @@
      dbHandler.flush();
      // look again in the db
      cursor = db.openReadCursor(changeNumber);
      cursor = db.openReadCursor(startAfterCN);
      if (cursor == null)
      {
        throw new ChangelogException(Message.raw("no new change"));