mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Fix null pointer
This commit is contained in:
parent
ea8cbc111c
commit
f85881e860
1 changed files with 6 additions and 1 deletions
|
@ -49,7 +49,10 @@ import javafx.collections.ListChangeListener;
|
||||||
import javafx.collections.ObservableList;
|
import javafx.collections.ObservableList;
|
||||||
import javafx.scene.chart.XYChart;
|
import javafx.scene.chart.XYChart;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
class OfferBookChartViewModel extends ActivatableViewModel {
|
class OfferBookChartViewModel extends ActivatableViewModel {
|
||||||
|
@ -298,6 +301,7 @@ class OfferBookChartViewModel extends ActivatableViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
final Optional<Offer> highestBuyVolumeOffer = allBuyOffers.stream()
|
final Optional<Offer> highestBuyVolumeOffer = allBuyOffers.stream()
|
||||||
|
.filter(o -> o.getVolume() != null)
|
||||||
.max(Comparator.comparingLong(o -> o.getVolume().getValue()));
|
.max(Comparator.comparingLong(o -> o.getVolume().getValue()));
|
||||||
|
|
||||||
if (highestBuyVolumeOffer.isPresent()) {
|
if (highestBuyVolumeOffer.isPresent()) {
|
||||||
|
@ -337,6 +341,7 @@ class OfferBookChartViewModel extends ActivatableViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
final Optional<Offer> highestSellVolumeOffer = allSellOffers.stream()
|
final Optional<Offer> highestSellVolumeOffer = allSellOffers.stream()
|
||||||
|
.filter(o -> o.getVolume() != null)
|
||||||
.max(Comparator.comparingLong(o -> o.getVolume().getValue()));
|
.max(Comparator.comparingLong(o -> o.getVolume().getValue()));
|
||||||
|
|
||||||
if (highestSellVolumeOffer.isPresent()) {
|
if (highestSellVolumeOffer.isPresent()) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue