diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-06 17:19:59 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-06 17:19:59 +0900 |
commit | 5f082de9bb4c558775203f06a91e58f2dadd88de (patch) | |
tree | 7a92c2c0e0128586d0a39d40090322983b34cc16 | |
parent | 07341b2947f92f26c660a013bfb0ff0a5d5e2ecf (diff) | |
download | jgit-5f082de9bb4c558775203f06a91e58f2dadd88de.tar.gz jgit-5f082de9bb4c558775203f06a91e58f2dadd88de.zip |
FileSnapshotTest: Open FileOutputStream in try-with-resource
Change-Id: I187dd61e3e7d6f141722bf1af86a7fe04711057d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileSnapshotTest.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileSnapshotTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileSnapshotTest.java index 9998666052..9ceaa345d9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileSnapshotTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileSnapshotTest.java @@ -135,11 +135,8 @@ public class FileSnapshotTest { } private static void append(File f, byte b) throws IOException { - FileOutputStream os = new FileOutputStream(f, true); - try { + try (FileOutputStream os = new FileOutputStream(f, true)) { os.write(b); - } finally { - os.close(); } } |