mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2024-11-20 10:12:19 +01:00
WalletAppKit: remove unnecessary try/catch in startUp()
Remove the very long try/catch in startup that catches BlockStoreException and rethrows it wrapped in an IOException. The Guava service base class (`AbstractIdleService`) that we are extending allows us to throw `Exception` so there is no reason to wrap the exception and it can just be thrown directly.
This commit is contained in:
parent
54cd676560
commit
4bd79448ee
@ -318,7 +318,7 @@ public class WalletAppKit extends AbstractIdleService {
|
||||
}
|
||||
}
|
||||
log.info("Starting up with directory = {}", directory);
|
||||
try {
|
||||
|
||||
File chainFile = new File(directory, filePrefix + ".spvchain");
|
||||
boolean chainFileExists = chainFile.exists();
|
||||
vWalletFile = new File(directory, filePrefix + ".wallet");
|
||||
@ -398,9 +398,6 @@ public class WalletAppKit extends AbstractIdleService {
|
||||
}
|
||||
});
|
||||
}
|
||||
} catch (BlockStoreException e) {
|
||||
throw new IOException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private Wallet createOrLoadWallet(boolean shouldReplayWallet) throws Exception {
|
||||
|
Loading…
Reference in New Issue
Block a user