FINERACT-2267: Use the proper not-null annotation in Fineract code base
This commit is contained in:
committed by
Adam Saghy
parent
8d7d8ca7ef
commit
d71c0bd204
+2
-2
@@ -27,7 +27,7 @@ import org.apache.fineract.infrastructure.core.service.DateUtils;
|
||||
import org.apache.fineract.portfolio.loanaccount.data.LoanTermVariationsData;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanCharge;
|
||||
import org.apache.fineract.portfolio.loanaccount.domain.LoanTransaction;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
@Getter
|
||||
public class ChangeOperation implements Comparable<ChangeOperation> {
|
||||
@@ -116,7 +116,7 @@ public class ChangeOperation implements Comparable<ChangeOperation> {
|
||||
|
||||
@Override
|
||||
@SuppressFBWarnings(value = "EQ_COMPARETO_USE_OBJECT_EQUALS", justification = "TODO: fix this! See: https://stackoverflow.com/questions/2609037/findbugs-how-to-solve-eq-compareto-use-object-equals")
|
||||
public int compareTo(@NotNull ChangeOperation o) {
|
||||
public int compareTo(@NonNull ChangeOperation o) {
|
||||
int datePortion = DateUtils.compareWithNullsLast(this.getEffectiveDate(), o.getEffectiveDate());
|
||||
if (datePortion == 0) {
|
||||
final boolean isAccrual = isAccrualActivity();
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ package org.apache.fineract.portfolio.loanproduct.calc.data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.lang.NonNull;
|
||||
|
||||
public record InterestRate(//
|
||||
LocalDate effectiveFrom, //
|
||||
@@ -28,7 +28,7 @@ public record InterestRate(//
|
||||
) implements Comparable<InterestRate> {
|
||||
|
||||
@Override
|
||||
public int compareTo(@NotNull InterestRate o) {
|
||||
public int compareTo(@NonNull InterestRate o) {
|
||||
return this.effectiveFrom().compareTo(o.effectiveFrom());
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@@ -79,7 +79,7 @@ public class AdvancedPaymentAllocationsJsonParser {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@NonNull
|
||||
private List<PaymentAllocationType> getPaymentAllocationTypes(JsonArray paymentAllocationOrder) {
|
||||
if (paymentAllocationOrder != null) {
|
||||
List<Pair<Integer, PaymentAllocationType>> parsedListWithOrder = paymentAllocationOrder.asList().stream().map(json -> {
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ import java.util.Map;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.fineract.infrastructure.core.api.JsonCommand;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@@ -67,7 +67,7 @@ public class CreditAllocationsJsonParser {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@NonNull
|
||||
private List<AllocationType> getAllocationTypes(JsonArray allocationOrder) {
|
||||
if (allocationOrder != null) {
|
||||
List<Pair<Integer, AllocationType>> parsedListWithOrder = allocationOrder.asList().stream().map(json -> {
|
||||
|
||||
Reference in New Issue
Block a user