Fix null pointer vari
This commit is contained in:
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.prod_recupero_materiale;
|
|||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
@@ -66,7 +67,7 @@ public class ProdRecuperoMaterialeViewModel {
|
|||||||
this.mExecutorService.execute(() -> {
|
this.mExecutorService.execute(() -> {
|
||||||
try {
|
try {
|
||||||
List<HistoryVersamentoProdULDTO> lastUlVersate = mProdRecuperoMaterialeRESTConsumer.loadLastULVersateSynchronized(mCodJfas);
|
List<HistoryVersamentoProdULDTO> lastUlVersate = mProdRecuperoMaterialeRESTConsumer.loadLastULVersateSynchronized(mCodJfas);
|
||||||
this.mUlList.postValue(lastUlVersate);
|
this.mUlList.postValue(lastUlVersate != null ? lastUlVersate : new ArrayList<>());
|
||||||
this.sendOnDataRefreshEnded();
|
this.sendOnDataRefreshEnded();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.sendError(e);
|
this.sendError(e);
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package it.integry.integrywmsnative.gest.prod_rientro_merce.order_list;
|
|||||||
import androidx.databinding.ObservableField;
|
import androidx.databinding.ObservableField;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
@@ -76,7 +77,7 @@ public class ProdRientroMerceOrderListFilterViewModel {
|
|||||||
return Objects.requireNonNull(commesseFullList).stream()
|
return Objects.requireNonNull(commesseFullList).stream()
|
||||||
.filter(x -> x != null && codJcom.contains(x.getCodJcom()))
|
.filter(x -> x != null && codJcom.contains(x.getCodJcom()))
|
||||||
.distinct()
|
.distinct()
|
||||||
.sorted((o1, o2) -> o1.getCodJcom().compareTo(o2.getCodJfas()))
|
.sorted(Comparator.comparing(JtbComt::getCodJcom))
|
||||||
.collect(Collectors.toUnmodifiableList());
|
.collect(Collectors.toUnmodifiableList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user