FINERACT-2421: Refractor redundant and some deprecated code as per new Java 21 style (Phase 5)

This commit is contained in:
Aman-Mittal
2026-01-23 12:15:46 +01:00
committed by Adam Saghy
parent 6f1d96fc2c
commit 8b24325f84
18 changed files with 127 additions and 291 deletions
@@ -18,6 +18,9 @@
*/
package org.apache.fineract.portfolio.collateralmanagement.api;
import lombok.Getter;
@Getter
public enum CollateralManagementJsonInputParams {
NAME("name"), //
@@ -39,11 +42,7 @@ public enum CollateralManagementJsonInputParams {
@Override
public String toString() {
return name().replaceAll("_", " ");
}
public String getValue() {
return this.value;
return name().replace("_", " ");
}
}
@@ -141,12 +141,10 @@ public class DelinquencyReadPlatformServiceImpl implements DelinquencyReadPlatfo
// If the Loan is not Active yet or is cancelled (rejected or withdrawn), return template data
if (loan.isSubmittedAndPendingApproval() || loan.isApproved() || loan.isCancelled()) {
if (loan.getLoanProduct() != null && !loan.getLoanProduct().isAllowApprovedDisbursedAmountsOverApplied()) {
return collectionData;
} else {
if (loan.getLoanProduct() == null || loan.getLoanProduct().isAllowApprovedDisbursedAmountsOverApplied()) {
collectionData.setAvailableDisbursementAmountWithOverApplied(calculateAvailableDisbursementAmountWithOverApplied(loan));
return collectionData;
}
return collectionData;
}
final List<LoanDelinquencyAction> savedDelinquencyList = retrieveLoanDelinquencyActions(loanId);