Browse Source

DiffAlgorithms: Open Repository in try-with-resource

Change-Id: I67cb486283213f8aa964333533c55966518baa36
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.11
David Pursehouse 7 years ago
parent
commit
e466548235
  1. 5
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java

5
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java

@ -160,11 +160,8 @@ class DiffAlgorithms extends TextBuiltin {
else
rb.findGitDir(dir);
Repository repo = rb.build();
try {
try (Repository repo = rb.build()) {
run(repo);
} finally {
repo.close();
}
}
}

Loading…
Cancel
Save