mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-07 06:44:16 +00:00
Close the FileInputStream created in Wallet.loadFromFile(). Resolves issue 198.
This commit is contained in:
parent
80f141cbf5
commit
417dcefa67
@ -224,7 +224,12 @@ public class Wallet implements Serializable {
|
||||
* Returns a wallet deserialized from the given file.
|
||||
*/
|
||||
public static Wallet loadFromFile(File f) throws IOException {
|
||||
return loadFromFileStream(new FileInputStream(f));
|
||||
FileInputStream stream = new FileInputStream(f);
|
||||
try {
|
||||
return loadFromFileStream(stream);
|
||||
} finally {
|
||||
stream.close();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isConsistent() {
|
||||
|
Loading…
Reference in New Issue
Block a user