]> source.dussan.org Git - jgit.git/commitdiff
Fix RevCommitList to work with subclasses of RevWalk 99/1299/1
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 12 Aug 2010 23:47:17 +0000 (01:47 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Thu, 12 Aug 2010 23:47:17 +0000 (01:47 +0200)
Bug: 321502
Change-Id: Ic4bc49a0da90234271aea7c0a4e344a1c3620cfc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java

index 906f27c53ddecf862fd97873a72784e94d6c361a..753cbad5ff2bd8aa10e2d9bd92d139a8d9351caa 100644 (file)
@@ -302,16 +302,13 @@ public class RevCommitList<E extends RevCommit> extends RevObjectList<E> {
                if (walker == null || size > highMark)
                        return;
 
-               Generator p = walker.pending;
-               RevCommit c = p.next();
+               RevCommit c = walker.next();
                if (c == null) {
-                       walker.pending = EndGenerator.INSTANCE;
                        walker = null;
                        return;
                }
                enter(size, (E) c);
                add((E) c);
-               p = walker.pending;
 
                while (size <= highMark) {
                        int index = size;
@@ -331,9 +328,8 @@ public class RevCommitList<E extends RevCommit> extends RevObjectList<E> {
 
                        final Object[] dst = s.contents;
                        while (size <= highMark && index < BLOCK_SIZE) {
-                               c = p.next();
+                               c = walker.next();
                                if (c == null) {
-                                       walker.pending = EndGenerator.INSTANCE;
                                        walker = null;
                                        return;
                                }