diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-03-02 10:43:10 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-03-02 23:33:27 +0100 |
commit | 1d073e30d7486ee0116931d045c45b6abf235299 (patch) | |
tree | 21683ceb3651997a80b27ba885168dc06cdac0ec /org.eclipse.jgit/src/org | |
parent | 1cff378a850c260e2476bbbf63923213f72d5714 (diff) | |
download | jgit-1d073e30d7486ee0116931d045c45b6abf235299.tar.gz jgit-1d073e30d7486ee0116931d045c45b6abf235299.zip |
[errorprone] Suppress [Finally] warnings
In these cases we use Throwable#addSuppressed to ensure the exception
thrown in the catch block preceding the finally block throwing another
exception isn't lost.
Change-Id: I96e78a5c15238ab77ac90ca1901850ce19acfcd8
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java | 1 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java index e0eb126440..f02160e457 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java @@ -90,6 +90,7 @@ class FetchProcess { .collect(Collectors.toList()); } + @SuppressWarnings("Finally") void execute(ProgressMonitor monitor, FetchResult result, String initialBranch) throws NotSupportedException, TransportException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java index d67fe074e4..ed8f450c53 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java @@ -470,6 +470,7 @@ class WalkFetchConnection extends BaseFetchConnection { } } + @SuppressWarnings("Finally") private boolean downloadPackedObject(final ProgressMonitor monitor, final AnyObjectId id) throws TransportException { // Search for the object in a remote pack whose index we have, |