Browse Source

FileBasedConfigTest: Open FileOutputStream in try-with-resource

Change-Id: Id4c49d4af30bcc5210d35630a8699574694060bb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.11
David Pursehouse 7 years ago
parent
commit
eaa7c20515
  1. 5
      org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java

5
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileBasedConfigTest.java

@ -242,11 +242,8 @@ public class FileBasedConfigTest {
dir.mkdirs();
File f = File.createTempFile(getClass().getName(), null, dir);
FileOutputStream os = new FileOutputStream(f, true);
try {
try (FileOutputStream os = new FileOutputStream(f, true)) {
os.write(content);
} finally {
os.close();
}
return f;
}

Loading…
Cancel
Save