diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 14:42:42 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 14:52:09 +0900 |
commit | b4656572388015dad6b968e41f767d4e8a414525 (patch) | |
tree | 4b98ed76d3c7c20b0c4efd09c2f3e77a697a12dd /org.eclipse.jgit.junit.http | |
parent | 6df350ee0e58cc49f5f88bebd996656f7c4af6fc (diff) | |
download | jgit-b4656572388015dad6b968e41f767d4e8a414525.tar.gz jgit-b4656572388015dad6b968e41f767d4e8a414525.zip |
HttpTestCase#fsck: Open TestRepository in try-with-resource
Change-Id: Ibda8c9970322871abf0fcf1244977bed04eaedd2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.junit.http')
-rw-r--r-- | org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java index a133ca6a72..41bc97dc26 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java @@ -186,9 +186,10 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { */ protected static void fsck(Repository db, RevObject... tips) throws Exception { - TestRepository<? extends Repository> tr = - new TestRepository<>(db); - tr.fsck(tips); + try (TestRepository<? extends Repository> tr = + new TestRepository<>(db)) { + tr.fsck(tips); + } } /** |