FINERACT-2326: Refractor redundant and some deprecated code as per new Java 21 style
This commit is contained in:
+1
-1
@@ -86,7 +86,7 @@ public class CreditAllocationsValidator {
|
||||
}
|
||||
|
||||
private boolean hasLoanProductCreditAllocationRule(List<LoanProductCreditAllocationRule> rules) {
|
||||
return rules != null && rules.size() > 0;
|
||||
return rules != null && !rules.isEmpty();
|
||||
}
|
||||
|
||||
private void raiseValidationError(String globalisationMessageCode, String msg) {
|
||||
|
||||
+3
-6
@@ -94,9 +94,7 @@ public class CreditAllocationsJsonParserTest {
|
||||
|
||||
private static List<Pair<Integer, AllocationType>> createAllocationTypeList() {
|
||||
AtomicInteger i = new AtomicInteger(1);
|
||||
List<Pair<Integer, AllocationType>> list = EnumSet.allOf(AllocationType.class).stream().map(p -> Pair.of(i.getAndIncrement(), p))
|
||||
.toList();
|
||||
return list;
|
||||
return EnumSet.allOf(AllocationType.class).stream().map(p -> Pair.of(i.getAndIncrement(), p)).toList();
|
||||
}
|
||||
|
||||
public Map<String, Object> createCreditAllocationEntry(String transactionType, List<String> orderedRules) {
|
||||
@@ -117,9 +115,8 @@ public class CreditAllocationsJsonParserTest {
|
||||
private JsonCommand createJsonCommand(Map<String, Object> jsonMap) throws JsonProcessingException {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String json = objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(jsonMap);
|
||||
JsonCommand command = JsonCommand.from(json, JsonParser.parseString(json), fromJsonHelper, null, 1L, 2L, 3L, 4L, null, null, null,
|
||||
null, null, null, null, null, null);
|
||||
return command;
|
||||
return JsonCommand.from(json, JsonParser.parseString(json), fromJsonHelper, null, 1L, 2L, 3L, 4L, null, null, null, null, null,
|
||||
null, null, null, null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user