summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogWriterTest.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogWriterTest.java
index 7f40bae556..1d188c3148 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ReflogWriterTest.java
@@ -87,11 +87,8 @@ public class ReflogWriterTest extends SampleDataRepositoryTestCase {
"oops, cannot create the directory for the test reflog file"
+ logfile);
}
- FileInputStream fileInputStream = new FileInputStream(logfile);
- try {
+ try (FileInputStream fileInputStream = new FileInputStream(logfile)) {
fileInputStream.read(buffer);
- } finally {
- fileInputStream.close();
}
}
}