Browse Source

AbbreviationTest: Open FileOutputStream in try-with-resource

Change-Id: Id1d48da466251f9e4186f4674afba4b5901a4388
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-4.11
David Pursehouse 7 years ago committed by Matthias Sohn
parent
commit
91a2be13e5
  1. 5
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/AbbreviationTest.java

5
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); PackIndexWriter writer = new PackIndexWriterV2(dst);
writer.write(objects, new byte[OBJECT_ID_LENGTH]); 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)); assertEquals(id.abbreviate(20), reader.abbreviate(id, 2));

Loading…
Cancel
Save