Skip to content

Commit

Permalink
added check for trustFrameworkCriteria not null
Browse files Browse the repository at this point in the history
Signed-off-by: Mohd Kaif Siddique <[email protected]>
  • Loading branch information
Mohd Kaif Siddique committed Jul 23, 2024
1 parent 06a24ed commit 4c5c0b9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ private VerifiedKycExchangeRequestDto buildVerifiedKycExchangeRequestDto(Verifie

int maxAge = filterDateTime != null ? filterDateTime.getMax_age() : 999; // Default value for maxAge if not set

if(!StringUtils.isEmpty(trustFrameworkCriteria.getValue())){
if(trustFrameworkCriteria!=null && !StringUtils.isEmpty(trustFrameworkCriteria.getValue())){
trustFrameWorkMap.computeIfAbsent(trustFrameworkCriteria.getValue(), k -> new ArrayList<>()).add(new AbstractMap.SimpleEntry<>(claimName, maxAge));
} else if (trustFrameworkCriteria.getValues()!=null && !trustFrameworkCriteria.getValues().isEmpty()) {
}else if (trustFrameworkCriteria!=null && trustFrameworkCriteria.getValues()!=null && !trustFrameworkCriteria.getValues().isEmpty()) {
for (String trustFramework : trustFrameworkCriteria.getValues()) {
trustFrameWorkMap.computeIfAbsent(trustFramework, list -> new ArrayList<>()).add(new AbstractMap.SimpleEntry<>(claimName, maxAge));
}
} else {
}else{
// Handle null trust_framework separately
trustFrameWorkMap.computeIfAbsent(null, list -> new ArrayList<>()).add(new AbstractMap.SimpleEntry<>(claimName, maxAge));
}
Expand Down

0 comments on commit 4c5c0b9

Please sign in to comment.