diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2018-03-02 11:08:05 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2018-03-03 23:58:49 +0100 |
commit | 91a2be13e5beab05882d275bf5dee7cf14820f9b (patch) | |
tree | c6a65e906ea71d9b09d48dca04bf81b5aa7093d2 /org.eclipse.jgit.test/tst/org/eclipse/jgit/internal | |
parent | cf489d36b9d5c9e1c0017d267fb92287f52aa9df (diff) | |
download | jgit-91a2be13e5beab05882d275bf5dee7cf14820f9b.tar.gz jgit-91a2be13e5beab05882d275bf5dee7cf14820f9b.zip |
AbbreviationTest: Open FileOutputStream in try-with-resource
Change-Id: Id1d48da466251f9e4186f4674afba4b5901a4388
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/internal')
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AbbreviationTest.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AbbreviationTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AbbreviationTest.java index a9edf73b85..14863488ca 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AbbreviationTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AbbreviationTest.java @@ -187,7 +187,10 @@ public class AbbreviationTest extends LocalDiskRepositoryTestCase { PackIndexWriter writer = new PackIndexWriterV2(dst); writer.write(objects, new byte[OBJECT_ID_LENGTH]); } - new FileOutputStream(packFile).close(); + + try (FileOutputStream unused = new FileOutputStream(packFile)) { + // unused + } assertEquals(id.abbreviate(20), reader.abbreviate(id, 2)); |