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

Jean-Noel Rouvignac
13.17.2013 fe6725b4cde23ba558393a0687bf93842258e66a
opends/src/server/org/opends/server/replication/server/changelog/je/CompositeDBCursor.java
@@ -80,12 +80,12 @@
  public boolean next() throws ChangelogException
  {
    // try to recycle empty cursors in case the underlying ReplicaDBs received
    // new changes
    for (Iterator<DBCursor<UpdateMsg>> iter = exhaustedCursors.iterator(); iter
        .hasNext();)
    // new changes. Copy the List to avoid ConcurrentModificationExceptions.
    DBCursor<UpdateMsg>[] copy =
        exhaustedCursors.toArray(new DBCursor[exhaustedCursors.size()]);
    exhaustedCursors.clear();
    for (DBCursor<UpdateMsg> cursor : copy)
    {
      DBCursor<UpdateMsg> cursor = iter.next();
      iter.remove();
      cursor.next();
      add(cursor);
    }