Skip to content

Commit

Permalink
[INJICERT-695] handle null data when creating mdoc data entry (#93)
Browse files Browse the repository at this point in the history
In case of IndividualId not stored, documentNumber value becomes null and mdoc generated will have the documentNumber field as empty

Signed-off-by: KiruthikaJeyashankar <[email protected]>
Signed-off-by: Vishwa <[email protected]>
  • Loading branch information
KiruthikaJeyashankar authored Dec 19, 2024
1 parent 3a51e4e commit f48d218
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public String generate(Map<String, Object> data, String holderId, String issuerK
drivingPrivileges.put("issue_date", formattedIssueDate);
drivingPrivileges.put("expiry_date", formattedExpiryDate);

data.keySet().forEach(key -> nameSpacedDataBuilder.putEntryString(NAMESPACE, key, data.get(key).toString()));
data.keySet().forEach(key -> nameSpacedDataBuilder.putEntryString(NAMESPACE, key, Objects.toString(data.get(key),"")));

NameSpacedData nameSpacedData = nameSpacedDataBuilder.build();
Map<String, List<byte[]>> generatedIssuerNameSpaces = MdocUtil.generateIssuerNameSpaces(nameSpacedData, new Random(SEED), 16);
Expand Down

0 comments on commit f48d218

Please sign in to comment.