SquashMessageFormatterTest: Open git in try-with-resource
Change-Id: Ife94d1f0279ed3671a9bca79fb26c0403549fa17 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
This commit is contained in:
parent
6aa619ec5c
commit
d882bf8c4d
|
@ -73,7 +73,7 @@ public void setUp() throws Exception {
|
|||
|
||||
@Test
|
||||
public void testCommit() throws Exception {
|
||||
Git git = new Git(db);
|
||||
try (Git git = new Git(db)) {
|
||||
revCommit = git.commit().setMessage("squash_me").call();
|
||||
|
||||
Ref master = db.exactRef("refs/heads/master");
|
||||
|
@ -86,4 +86,5 @@ public void testCommit() throws Exception {
|
|||
+ ">\nDate: " + dateFormatter.formatDate(author)
|
||||
+ "\n\n\tsquash_me\n", message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue