From db2d379c9ccb90f6f958da85d4d72e2567348b7e Mon Sep 17 00:00:00 2001 From: Fabio Ponciroli Date: Fri, 11 Feb 2022 09:19:31 +0100 Subject: [PATCH] Remove unused warning suppression SuppressWarnings is not used. Remove to avoid warnings at compile time. Change-Id: I84e3e57017cf9fd68d3377f866d4dd907ccde454 --- .../jgit/internal/storage/dfs/LargePackedWholeObject.java | 1 - org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java index b0612f9395..cd4f168d86 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java @@ -73,7 +73,6 @@ final class LargePackedWholeObject extends ObjectLoader { public ObjectStream openStream() throws MissingObjectException, IOException { PackInputStream packIn; // ctx is closed by PackInputStream, or explicitly in the finally block - @SuppressWarnings("resource") DfsReader ctx = db.newReader(); try { try { 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 0a7eb17f05..b5062fdd1a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -2339,7 +2339,7 @@ public class UploadPack { : req.getDepth() - 1; pw.setShallowPack(req.getDepth(), unshallowCommits); - @SuppressWarnings("resource") // Ownership is transferred below + // Ownership is transferred below DepthWalk.RevWalk dw = new DepthWalk.RevWalk( walk.getObjectReader(), walkDepth); dw.setDeepenSince(req.getDeepenSince()); -- 2.39.5