From aeba0032003480dd821edc22fa4ab1a66192549f Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 8 Nov 2018 17:55:19 -0800 Subject: [PATCH] Simplify exception handling in RevWalk#iterator MissingObjectException and IncorrectObjectTypeException are subclasses of IOException. Change-Id: Ib4e1f37ce1b0b08e69ba3375bbdb6ee82ee4f036 Signed-off-by: Jonathan Nieder --- .../src/org/eclipse/jgit/revwalk/RevWalk.java | 8 -------- 1 file changed, 8 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java index 4d555d217..a42721afa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java @@ -1356,10 +1356,6 @@ public class RevWalk implements Iterable, 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, 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); }