Browse Source

UploadPack: Suppress false-positive resource leak warning

Change-Id: Ida09cabb11740e6752a6f079d0528d38021fa2dd
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.4
David Pursehouse 6 years ago
parent
commit
91b1fe4687
  1. 1
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

1
org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java

@ -2120,6 +2120,7 @@ public class UploadPack {
: req.getDepth() - 1; : req.getDepth() - 1;
pw.setShallowPack(req.getDepth(), unshallowCommits); pw.setShallowPack(req.getDepth(), unshallowCommits);
@SuppressWarnings("resource") // Ownership is transferred below
DepthWalk.RevWalk dw = new DepthWalk.RevWalk( DepthWalk.RevWalk dw = new DepthWalk.RevWalk(
walk.getObjectReader(), walkDepth); walk.getObjectReader(), walkDepth);
dw.setDeepenSince(req.getDeepenSince()); dw.setDeepenSince(req.getDeepenSince());

Loading…
Cancel
Save