3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-15 11:45:51 +00:00

"@Override" annotation should be used on any method overriding (since Java 5) or implementing (since Java 6) another one.

This commit is contained in:
Kirill Vlasov 2015-12-08 10:27:29 +01:00 committed by Andreas Schildbach
parent 313e2c14c1
commit 0ba3f4c2d2
4 changed files with 6 additions and 0 deletions

View File

@ -148,9 +148,11 @@ public class TorDiscovery implements PeerDiscovery {
}
});
Futures.addCallback(openCircuit, new FutureCallback<Circuit>() {
@Override
public void onSuccess(Circuit circuit) {
doneSignal.countDown();
}
@Override
public void onFailure(Throwable thrown) {
doneSignal.countDown();
}

View File

@ -345,6 +345,7 @@ public class KeyChainGroup implements KeyBag {
return importKeys(encryptedKeys);
}
@Override
@Nullable
public RedeemData findRedeemDataFromScriptHash(byte[] scriptHash) {
// Iterate in reverse order, since the active keychain is the one most likely to have the hit

View File

@ -90,6 +90,7 @@ public class MarriedKeyChain extends DeterministicKeyChain {
return self();
}
@Override
public MarriedKeyChain build() {
checkState(random != null || entropy != null || seed != null || watchingKey!= null, "Must provide either entropy or random or seed or watchingKey");
checkNotNull(followingKeys, "followingKeys must be provided");

View File

@ -67,10 +67,12 @@ public class SendRequest {
// Bitcoinj is using the ListenableFutures of the Guava library. Have a look here for more information: https://code.google.com/p/guava-libraries/wiki/ListenableFutureExplained
ListenableFuture<Coin> balanceFuture = kit.wallet().getBalanceFuture(value, BalanceType.AVAILABLE);
FutureCallback<Coin> callback = new FutureCallback<Coin>() {
@Override
public void onSuccess(Coin balance) {
System.out.println("coins arrived and the wallet now has enough balance");
}
@Override
public void onFailure(Throwable t) {
System.out.println("something went wrong");
}