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

This commit is contained in:
Aman-Mittal
2025-12-26 19:27:38 +01:00
committed by Adam Saghy
parent 7dac82a4fc
commit 0ba1745443
18 changed files with 82 additions and 145 deletions
@@ -40,8 +40,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ThreadLocalRandom;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.RandomUtils;
import org.apache.fineract.batch.command.internal.AdjustLoanTransactionCommandStrategy;
import org.apache.fineract.batch.command.internal.CreateTransactionLoanCommandStrategy;
import org.apache.fineract.batch.command.internal.GetDatatableEntryByAppTableIdAndDataTableIdCommandStrategy;
@@ -413,7 +413,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
.withInterestTypeAsDecliningBalance() //
.currencyDetails("0", "100").build(null);
final Long applyLoanRequestId = Long.valueOf(RandomStringUtils.randomNumeric(4));
final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(1000, 10_000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long createChargeRequestId = disburseLoanRequestId + 1;
@@ -474,7 +474,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
.withInterestTypeAsDecliningBalance() //
.currencyDetails("0", "100").build(null);
final Long applyLoanRequestId = Long.valueOf(RandomStringUtils.randomNumeric(4));
final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(1000, 10_000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long createChargeRequestId = disburseLoanRequestId + 1;
@@ -1671,7 +1671,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
final Integer productId = new LoanTransactionHelper(this.requestSpec, this.responseSpec).getLoanProductId(loanProductJSON);
final LocalDate date = LocalDate.now(Utils.getZoneIdOfTenant());
final Long applyLoanRequestId = Long.valueOf(RandomStringUtils.randomNumeric(4));
final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(1000, 10_000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long getLoanBeforeTxnRequestId = disburseLoanRequestId + 1;
@@ -2275,7 +2275,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
.withInterestTypeAsDecliningBalance() //
.currencyDetails("0", "100").build(null);
final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000);
final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long updateLoanRequestId = disburseLoanRequestId + 1;
@@ -2332,7 +2332,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
.withInterestTypeAsDecliningBalance() //
.currencyDetails("0", "100").build(null);
final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000);
final long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long updateLoanRequestId = disburseLoanRequestId + 1;
@@ -2399,7 +2399,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
.withInterestTypeAsDecliningBalance() //
.currencyDetails("0", "100").build(null);
final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000);
final long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long getLoanRequestId = disburseLoanRequestId + 1;
@@ -2481,7 +2481,7 @@ public class BatchApiTest extends BaseLoanIntegrationTest {
.withInterestTypeAsDecliningBalance() //
.currencyDetails("0", "100").build(null);
final Long applyLoanRequestId = RandomUtils.nextLong(100, 1000);
final Long applyLoanRequestId = ThreadLocalRandom.current().nextLong(100, 1000);
final Long approveLoanRequestId = applyLoanRequestId + 1;
final Long disburseLoanRequestId = approveLoanRequestId + 1;
final Long getLoanRequestId = disburseLoanRequestId + 1;