ReflogReaderTest: Open FileOutputStream in try-with-resource
Change-Id: I09af22292cc4b615b40a820dbc054282bb0c76b8 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
c77e66dd1a
commit
18f2cfc7d1
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue