diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 15:00:08 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2019-01-20 15:00:08 +0900 |
commit | fb7b94313a21ffb1458cfb5fe1c6aeabc36fe387 (patch) | |
tree | 7a6c647b0000f849d819c995a71e8918105ac1d4 /org.eclipse.jgit.http.test | |
parent | 4635f38c094e64370d276391061aa9ddb81e4a22 (diff) | |
download | jgit-fb7b94313a21ffb1458cfb5fe1c6aeabc36fe387.tar.gz jgit-fb7b94313a21ffb1458cfb5fe1c6aeabc36fe387.zip |
DumbClientSmartServerTest: Open TestRepository in try-with-resource
Change-Id: Ica172a85ec9b7da1416ff1b22699809f2c8c9df7
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java index 5fdc10e73e..2d22bafd86 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientSmartServerTest.java @@ -215,7 +215,10 @@ public class DumbClientSmartServerTest 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)); |