ReflogReaderTest: Open FileOutputStream in try-with-resource

Change-Id: I09af22292cc4b615b40a820dbc054282bb0c76b8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2018-03-05 16:35:09 +09:00
parent c77e66dd1a
commit 18f2cfc7d1
1 changed files with 1 additions and 4 deletions

View File

@ -277,11 +277,8 @@ private void setupReflog(String logName, byte[] data)
"oops, cannot create the directory for the test reflog file"
+ logfile);
}
FileOutputStream fileOutputStream = new FileOutputStream(logfile);
try {
try (FileOutputStream fileOutputStream = new FileOutputStream(logfile)) {
fileOutputStream.write(data);
} finally {
fileOutputStream.close();
}
}