Browse Source

DescribeCommandTest: Open FileWriter in try-with-resource

Change-Id: Ida79bdae652faa88fbdb1b81e7e10b5019ff2c16
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.11
David Pursehouse 7 years ago
parent
commit
6d437a58f1
  1. 6
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java

6
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/DescribeCommandTest.java

@ -297,9 +297,9 @@ public class DescribeCommandTest extends RepositoryTestCase {
} }
private static void touch(File f, String contents) throws Exception { private static void touch(File f, String contents) throws Exception {
FileWriter w = new FileWriter(f); try (FileWriter w = new FileWriter(f)) {
w.write(contents); w.write(contents);
w.close(); }
} }
private String describe(ObjectId c1, boolean longDesc) private String describe(ObjectId c1, boolean longDesc)

Loading…
Cancel
Save