Skip to content

Commit

Permalink
Merge pull request mosip#15 from kaifk468/develop-test
Browse files Browse the repository at this point in the history
added check for trustFrameworkCriteria not null
  • Loading branch information
ckm007 authored Aug 7, 2024
2 parents 06a24ed + 4c5c0b9 commit 221c14e
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 221c14e

Please sign in to comment.