From 91b1fe4687c3bff3195e6f2ff207ea96fa626cca Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sun, 20 Jan 2019 17:41:59 +0900 Subject: [PATCH] UploadPack: Suppress false-positive resource leak warning Change-Id: Ida09cabb11740e6752a6f079d0528d38021fa2dd Signed-off-by: David Pursehouse --- org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index 19c5e530e..638d9325e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -2120,6 +2120,7 @@ public class UploadPack { : req.getDepth() - 1; pw.setShallowPack(req.getDepth(), unshallowCommits); + @SuppressWarnings("resource") // Ownership is transferred below DepthWalk.RevWalk dw = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth); dw.setDeepenSince(req.getDeepenSince());