Skip to content

Commit

Permalink
Verify optional message is not missing or a literal "null" value
Browse files Browse the repository at this point in the history
  • Loading branch information
tdonohue committed Oct 20, 2023
1 parent 5c296da commit 534ee3a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,10 @@ public RequestItemRest put(Context context, HttpServletRequest request,
}

JsonNode responseMessageNode = requestBody.findValue("responseMessage");
String message = responseMessageNode.asText();
String message = null;
if (responseMessageNode != null && !responseMessageNode.isNull()) {
message = responseMessageNode.asText();
}

ri.setDecision_date(new Date());
requestItemService.update(context, ri);
Expand Down

0 comments on commit 534ee3a

Please sign in to comment.