CommitGraphWriter: fix UnusedException errorprone error
Errorprone run in the bazel build raised this exception: org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java:105: error: [UnusedException] This catch block catches an exception and re-throws another, but swallows the caught exception rather than setting it as a cause. This can make debugging harder. } catch (InterruptedIOException e) { ^ (see https://errorprone.info/bugpattern/UnusedException) Did you mean 'throw new IOException(JGitText.get().commitGraphWritingCancelled, e);'? Change-Id: Iad832fe17955fc1e60e6a4902bc50fd9dca76b9d
This commit is contained in:
parent
6ca3d2194f
commit
04245494bb
|
@ -103,7 +103,8 @@ public void write(@NonNull ProgressMonitor monitor,
|
|||
writeChunks(monitor, out, chunks);
|
||||
writeCheckSum(out);
|
||||
} catch (InterruptedIOException e) {
|
||||
throw new IOException(JGitText.get().commitGraphWritingCancelled);
|
||||
throw new IOException(JGitText.get().commitGraphWritingCancelled,
|
||||
e);
|
||||
} finally {
|
||||
monitor.endTask();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue