Browse Source

SquashMessageFormatterTest: Open git in try-with-resource

Change-Id: Ife94d1f0279ed3671a9bca79fb26c0403549fa17
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
stable-4.2
David Pursehouse 9 years ago
parent
commit
d882bf8c4d
  1. 3
      org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SquashMessageFormatterTest.java

3
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SquashMessageFormatterTest.java

@ -73,7 +73,7 @@ public class SquashMessageFormatterTest extends SampleDataRepositoryTestCase {
@Test @Test
public void testCommit() throws Exception { public void testCommit() throws Exception {
Git git = new Git(db); try (Git git = new Git(db)) {
revCommit = git.commit().setMessage("squash_me").call(); revCommit = git.commit().setMessage("squash_me").call();
Ref master = db.exactRef("refs/heads/master"); Ref master = db.exactRef("refs/heads/master");
@ -87,3 +87,4 @@ public class SquashMessageFormatterTest extends SampleDataRepositoryTestCase {
+ "\n\n\tsquash_me\n", message); + "\n\n\tsquash_me\n", message);
} }
} }
}

Loading…
Cancel
Save