Browse Source

Simplify exception handling in RevWalk#iterator

MissingObjectException and IncorrectObjectTypeException are subclasses
of IOException.

Change-Id: Ib4e1f37ce1b0b08e69ba3375bbdb6ee82ee4f036
Signed-off-by: Jonathan Nieder <jrn@google.com>
tags/v5.2.0.201811281532-m3
Jonathan Nieder 5 years ago
parent
commit
aeba003200
1 changed files with 0 additions and 8 deletions
  1. 0
    8
      org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java

+ 0
- 8
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java View File

@@ -1356,10 +1356,6 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
final RevCommit first;
try {
first = RevWalk.this.next();
} catch (MissingObjectException e) {
throw new RevWalkException(e);
} catch (IncorrectObjectTypeException e) {
throw new RevWalkException(e);
} catch (IOException e) {
throw new RevWalkException(e);
}
@@ -1378,10 +1374,6 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
final RevCommit r = next;
next = RevWalk.this.next();
return r;
} catch (MissingObjectException e) {
throw new RevWalkException(e);
} catch (IncorrectObjectTypeException e) {
throw new RevWalkException(e);
} catch (IOException e) {
throw new RevWalkException(e);
}

Loading…
Cancel
Save