diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-06 09:52:12 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-06 09:52:12 +0900 |
commit | e46654823543ea74dea29478d8dbd2470d6190a5 (patch) | |
tree | 7e66f4ea93b6150cb28234895deb45cc8832ac70 /org.eclipse.jgit.pgm | |
parent | 6d437a58f1f68197a118529cefab207669592da4 (diff) | |
download | jgit-e46654823543ea74dea29478d8dbd2470d6190a5.tar.gz jgit-e46654823543ea74dea29478d8dbd2470d6190a5.zip |
DiffAlgorithms: Open Repository in try-with-resource
Change-Id: I67cb486283213f8aa964333533c55966518baa36
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java index 5f8ebdb1a9..0e1b398a73 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +++ b/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(); } } } |