mirror of
https://github.com/bisq-network/bisq.git
synced 2025-03-03 18:56:59 +01:00
Combine nested if statements
Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
parent
7c1c35f6e1
commit
533be5a1ca
1 changed files with 3 additions and 6 deletions
|
@ -60,17 +60,14 @@ public class PriceRequest {
|
||||||
if (!shutDownRequested) {
|
if (!shutDownRequested) {
|
||||||
resultFuture.set(marketPriceTuple);
|
resultFuture.set(marketPriceTuple);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onFailure(@NotNull Throwable throwable) {
|
public void onFailure(@NotNull Throwable throwable) {
|
||||||
if (!shutDownRequested) {
|
if (!shutDownRequested && !resultFuture.setException(new PriceRequestException(throwable, baseUrl))) {
|
||||||
if (!resultFuture.setException(new PriceRequestException(throwable, baseUrl))) {
|
|
||||||
// In case the setException returns false we need to cancel the future.
|
// In case the setException returns false we need to cancel the future.
|
||||||
resultFuture.cancel(true);
|
resultFuture.cancel(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}, MoreExecutors.directExecutor());
|
}, MoreExecutors.directExecutor());
|
||||||
|
|
||||||
return resultFuture;
|
return resultFuture;
|
||||||
|
|
Loading…
Add table
Reference in a new issue