summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/tst
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2019-01-20 14:58:35 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2019-01-20 14:58:35 +0900
commit4635f38c094e64370d276391061aa9ddb81e4a22 (patch)
tree716b771e4913f0ef30ef452874a1e8946ccd65f9 /org.eclipse.jgit.http.test/tst
parent7844b399666824427201c98b64dbc653a4c5301e (diff)
downloadjgit-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.java5
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));