Browse Source

FileSnapshotTest: Open FileOutputStream in try-with-resource

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

5
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();
}
}

Loading…
Cancel
Save