]> source.dussan.org Git - jgit.git/commit
CommitGraphWriter: fix UnusedException errorprone error 70/197670/1
authorMatthias Sohn <matthias.sohn@sap.com>
Tue, 13 Dec 2022 14:04:45 +0000 (15:04 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 13 Dec 2022 14:04:45 +0000 (15:04 +0100)
commit04245494bbbc45b989cdc75faa585ab61ec2e8c3
tree7f8ee263b5650e8820dab9295bd11183dba0fff6
parent6ca3d2194f55b699d34847eb36139665a9cb3fb6
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
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java