diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 14:58:35 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 14:58:35 +0900 |
commit | 4635f38c094e64370d276391061aa9ddb81e4a22 (patch) | |
tree | 716b771e4913f0ef30ef452874a1e8946ccd65f9 /org.eclipse.jgit.http.test/tst | |
parent | 7844b399666824427201c98b64dbc653a4c5301e (diff) | |
download | jgit-4635f38c094e64370d276391061aa9ddb81e4a22.tar.gz jgit-4635f38c094e64370d276391061aa9ddb81e4a22.zip |
DumbClientDumbServerTest: Open TestRepository in try-with-resource
Change-Id: Iaf339ae739689d4528a079776d6e945ba9006368
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java index 422be56dd4..c1e55cb6f5 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java @@ -213,7 +213,10 @@ public class DumbClientDumbServerTest extends HttpTestCase { @Test public void testInitialClone_Packed() throws Exception { - new TestRepository<>(remoteRepository).packAndPrune(); + try (TestRepository<Repository> tr = new TestRepository<>( + remoteRepository)) { + tr.packAndPrune(); + } Repository dst = createBareRepository(); assertFalse(dst.getObjectDatabase().has(A_txt)); |