diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-05 16:35:09 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-05 16:35:09 +0900 |
commit | 18f2cfc7d1927a36fe96efe8fb6c68a9bdb22a8b (patch) | |
tree | 7b2ff52f5b26aa37c4d30ca75d534027b22c8b42 /org.eclipse.jgit.test | |
parent | c77e66dd1af08787b84bc6df0f8ba02ad8eee607 (diff) | |
download | jgit-18f2cfc7d1927a36fe96efe8fb6c68a9bdb22a8b.tar.gz jgit-18f2cfc7d1927a36fe96efe8fb6c68a9bdb22a8b.zip |
ReflogReaderTest: Open FileOutputStream in try-with-resource
Change-Id: I09af22292cc4b615b40a820dbc054282bb0c76b8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogReaderTest.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogReaderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogReaderTest.java index 22931968d5..dc05eeabe1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogReaderTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogReaderTest.java @@ -277,11 +277,8 @@ public class ReflogReaderTest extends SampleDataRepositoryTestCase { "oops, cannot create the directory for the test reflog file" + logfile); } - FileOutputStream fileOutputStream = new FileOutputStream(logfile); - try { + try (FileOutputStream fileOutputStream = new FileOutputStream(logfile)) { fileOutputStream.write(data); - } finally { - fileOutputStream.close(); } } |