]> source.dussan.org Git - jgit.git/commitdiff
ConfigTest: Create Git instance in try-with-resource 30/64830/1
authorDavid Pursehouse <david.pursehouse@sonymobile.com>
Thu, 21 Jan 2016 06:31:56 +0000 (15:31 +0900)
committerDavid Pursehouse <david.pursehouse@sonymobile.com>
Thu, 21 Jan 2016 06:31:56 +0000 (15:31 +0900)
Change-Id: Ie65c69e0f1aed95bcdf68ebd68d21b3e2590b41c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/ConfigTest.java

index aefdff185cc3884350af17505feee54a07bc775d..23aa97eeedc5e86dc4978324e70192717b0c7451 100644 (file)
@@ -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