Use correct IO resource to read signature file
This commit is contained in:
@@ -1564,8 +1564,8 @@ public class Application
|
|||||||
} else {
|
} else {
|
||||||
File signatureFile = downloadFile(path + SIGNATURE_SUFFIX);
|
File signatureFile = downloadFile(path + SIGNATURE_SUFFIX);
|
||||||
byte[] signature = null;
|
byte[] signature = null;
|
||||||
try (FileReader reader = new FileReader(signatureFile)) {
|
try (FileInputStream signatureStream = new FileInputStream(signatureFile)) {
|
||||||
signature = StreamUtil.toByteArray(new FileInputStream(signatureFile));
|
signature = StreamUtil.toByteArray(signatureStream);
|
||||||
} finally {
|
} finally {
|
||||||
FileUtil.deleteHarder(signatureFile); // delete the file regardless
|
FileUtil.deleteHarder(signatureFile); // delete the file regardless
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user