aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test/tst/org/eclipse
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@sonymobile.com>2016-01-21 15:31:56 +0900
committerDavid Pursehouse <david.pursehouse@sonymobile.com>2016-01-21 15:31:56 +0900
commit72c94465bc09e77984b054d9f5ebe2f42713d23f (patch)
treee5876eeae2f3199413ae5f0eefc6a4e7d465579b /org.eclipse.jgit.pgm.test/tst/org/eclipse
parentce1a3d7ef8e4090b3cd9064908751cbf5f2db606 (diff)
downloadjgit-72c94465bc09e77984b054d9f5ebe2f42713d23f.tar.gz
jgit-72c94465bc09e77984b054d9f5ebe2f42713d23f.zip
ConfigTest: Create Git instance in try-with-resource
Change-Id: Ie65c69e0f1aed95bcdf68ebd68d21b3e2590b41c Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
Diffstat (limited to 'org.eclipse.jgit.pgm.test/tst/org/eclipse')
-rw-r--r--org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java
index aefdff185c..23aa97eeed 100644
--- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java
+++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java
@@ -60,7 +60,9 @@ public class ConfigTest extends CLIRepositoryTestCase {
@Before
public void setUp() throws Exception {
super.setUp();
- new Git(db).commit().setMessage("initial commit").call();
+ try (Git git = new Git(db)) {
+ git.commit().setMessage("initial commit").call();
+ }
}
@Test