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

Jean-Noel Rouvignac
04.43.2013 fe9b2994e042be96cb148e52fc58653fcf09aa9d
opends/src/server/org/opends/server/replication/server/changelog/je/DraftCNDbIterator.java
@@ -46,19 +46,20 @@
  private DraftCNDBCursor draftCNDbCursor;
  /**
   * Creates a new ReplicationIterator.
   * All created iterator must be released by the caller using the
   * releaseCursor() method.
   * Creates a new ReplicationIterator. All created iterator must be released by
   * the caller using the {@link #close()} method.
   *
   * @param db           The db where the iterator must be created.
   * @param startDraftCN The draft CN  after which the iterator
   *                     must start.
   * @throws ChangelogException If a database problem happened.
   * @param db
   *          The db where the iterator must be created.
   * @param startChangeNumber
   *          The change number after which the iterator must start.
   * @throws ChangelogException
   *           If a database problem happened.
   */
  public DraftCNDbIterator(DraftCNDB db, int startDraftCN)
  public DraftCNDbIterator(DraftCNDB db, int startChangeNumber)
      throws ChangelogException
  {
    draftCNDbCursor = db.openReadCursor(startDraftCN);
    draftCNDbCursor = db.openReadCursor(startChangeNumber);
    if (draftCNDbCursor == null)
    {
      throw new ChangelogException(Message.raw("no new change"));
@@ -97,11 +98,9 @@
  /** {@inheritDoc} */
  @Override
  public int getDraftCN()
  public int getChangeNumber()
  {
    ReplicationDraftCNKey sk = (ReplicationDraftCNKey) draftCNDbCursor.getKey();
    int currentSeqnum = sk.getDraftCN();
    return currentSeqnum;
    return ((ReplicationDraftCNKey) draftCNDbCursor.getKey()).getChangeNumber();
  }
  /** {@inheritDoc} */