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

This commit is contained in:
Aman-Mittal
2025-12-17 08:51:47 +01:00
committed by Adam Saghy
parent 695816f990
commit 4bfae0400c
21 changed files with 196 additions and 206 deletions
@@ -42,9 +42,8 @@ public class FineractClientConfiguration {
String apiBaseUrl = baseUrl + "/fineract-provider/api/";
boolean debugEnabled = Boolean.parseBoolean(System.getProperty("fineract.feign.debug", "false"));
FineractFeignClient client = FineractFeignClient.builder().baseUrl(apiBaseUrl).credentials(username, password).tenantId(tenantId)
return FineractFeignClient.builder().baseUrl(apiBaseUrl).credentials(username, password).tenantId(tenantId)
.disableSslVerification(true).debug(debugEnabled).connectTimeout(60, TimeUnit.SECONDS)
.readTimeout((int) readTimeout, TimeUnit.SECONDS).build();
return client;
}
}
@@ -44,10 +44,8 @@ public class MessagingProperties implements InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
if (eventProperties.isEventVerificationEnabled()) {
if (isBlank(brokerUrl) || isBlank(topicName)) {
throw new IllegalStateException("Broker and topic must be configured in case event verification is enabled");
}
if (eventProperties.isEventVerificationEnabled() && (isBlank(brokerUrl) || isBlank(topicName))) {
throw new IllegalStateException("Broker and topic must be configured in case event verification is enabled");
}
}
}
@@ -165,7 +165,7 @@ public class JournalEntriesStepDef extends AbstractStepDef {
}
public List<List<JournalEntryTransactionItem>> getJournalLinesActualList(List<GetLoansLoanIdTransactions> transactionsMatch) {
List<List<JournalEntryTransactionItem>> journalLinesActualList = transactionsMatch.stream().map(t -> {
return transactionsMatch.stream().map(t -> {
String transactionId = "L" + t.getId();
GetJournalEntriesTransactionIdResponse journalEntryDataResponse = null;
try {
@@ -179,8 +179,6 @@ public class JournalEntriesStepDef extends AbstractStepDef {
return journalEntryDataResponse.getPageItems();
}).collect(Collectors.toList());
return journalLinesActualList;
}
@Then("Loan Transactions tab has {int} a {string} transactions with date {string} which has the following Journal entries:")