summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.http.test')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java16
1 files changed, 12 insertions, 4 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
index 83083f8a4e..fbc12e0c32 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
@@ -1008,8 +1008,12 @@ public class SmartClientSmartServerTest extends HttpTestCase {
// Create a new commit on the remote.
//
- b = new TestRepository<>(remoteRepository).branch(master);
- RevCommit Z = b.commit().message("Z").create();
+ RevCommit Z;
+ try (TestRepository<Repository> tr = new TestRepository<>(
+ remoteRepository)) {
+ b = tr.branch(master);
+ Z = b.commit().message("Z").create();
+ }
// Now incrementally update.
//
@@ -1068,8 +1072,12 @@ public class SmartClientSmartServerTest extends HttpTestCase {
// Create a new commit on the remote.
//
- b = new TestRepository<>(remoteRepository).branch(master);
- RevCommit Z = b.commit().message("Z").create();
+ RevCommit Z;
+ try (TestRepository<Repository> tr = new TestRepository<>(
+ remoteRepository)) {
+ b = tr.branch(master);
+ Z = b.commit().message("Z").create();
+ }
// Now incrementally update.
//