ensure wallet export file streams are always closed

This commit is contained in:
Craig Raw
2021-04-30 14:03:58 +02:00
parent 45f6ae214a
commit 5ede1dd97d
5 changed files with 4 additions and 7 deletions
@@ -31,7 +31,6 @@ public class SpecterDesktop implements WalletImport, WalletExport {
String json = gson.toJson(specterWallet);
outputStream.write(json.getBytes(StandardCharsets.UTF_8));
outputStream.flush();
outputStream.close();
} catch(Exception e) {
log.error("Error exporting Specter Desktop wallet", e);
throw new ExportException("Error exporting Specter Desktop wallet", e);