Use correct IO resource to read signature file

This commit is contained in:
Daniel Gredler
2018-08-28 15:24:44 -04:00
parent 2bef709cfd
commit cd76ed6be9
@@ -1564,8 +1564,8 @@ public class Application
} else {
File signatureFile = downloadFile(path + SIGNATURE_SUFFIX);
byte[] signature = null;
try (FileReader reader = new FileReader(signatureFile)) {
signature = StreamUtil.toByteArray(new FileInputStream(signatureFile));
try (FileInputStream signatureStream = new FileInputStream(signatureFile)) {
signature = StreamUtil.toByteArray(signatureStream);
} finally {
FileUtil.deleteHarder(signatureFile); // delete the file regardless
}