DescribeCommandTest: Open FileWriter in try-with-resource
Change-Id: Ida79bdae652faa88fbdb1b81e7e10b5019ff2c16 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
3393f78210
commit
6d437a58f1
|
@ -297,9 +297,9 @@ private void tag(String tag) throws GitAPIException {
|
|||
}
|
||||
|
||||
private static void touch(File f, String contents) throws Exception {
|
||||
FileWriter w = new FileWriter(f);
|
||||
w.write(contents);
|
||||
w.close();
|
||||
try (FileWriter w = new FileWriter(f)) {
|
||||
w.write(contents);
|
||||
}
|
||||
}
|
||||
|
||||
private String describe(ObjectId c1, boolean longDesc)
|
||||
|
|
Loading…
Reference in New Issue