Browse Source

Remove useless for(;;) loop

Change-Id: Ic9a7824cc178e92f44126acc8e77b0304b20ef4f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
stable-4.11
Thomas Wolf 7 years ago committed by Matthias Sohn
parent
commit
e00f59b7fe
  1. 10
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java

10
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java

@ -93,11 +93,10 @@ class RewriteGenerator extends Generator {
@Override
RevCommit next() throws MissingObjectException,
IncorrectObjectTypeException, IOException {
for (;;) {
final RevCommit c = source.next();
if (c == null)
if (c == null) {
return null;
}
boolean rewrote = false;
final RevCommit[] pList = c.parents;
final int nParents = pList.length;
@ -109,11 +108,10 @@ class RewriteGenerator extends Generator {
rewrote = true;
}
}
if (rewrote)
if (rewrote) {
c.parents = cleanup(pList);
return c;
}
return c;
}
private RevCommit rewrite(RevCommit p) {

Loading…
Cancel
Save