Skip to content

Commit

Permalink
[INJICERT-434] add condition for Object and other non-standard types (#…
Browse files Browse the repository at this point in the history
…139)

* NOTE: This assumes that every such object has a custom toString()
  method.

Signed-off-by: Harsh Vardhan <[email protected]>
Signed-off-by: Vishwa <[email protected]>
  • Loading branch information
vharsh authored Nov 27, 2024
1 parent 2ae629b commit 14c68a5
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ public String format(JSONObject templateInput, Map<String, Object> defaultSettin
} else if (value instanceof String){
// entities which need to be quoted
finalTemplate.put(key, JSONObject.wrap(value));
} else {
finalTemplate.put(key, value);
}
}
// Date: https://velocity.apache.org/tools/3.1/apidocs/org/apache/velocity/tools/generic/DateTool.html
Expand Down

0 comments on commit 14c68a5

Please sign in to comment.