FINERACT-1975: BatchAPI - JSON handler cannot handle null (fix)
This commit is contained in:
@@ -182,6 +182,9 @@ public class ResolutionHelper {
|
|||||||
} else if (element.isJsonArray()) {
|
} else if (element.isJsonArray()) {
|
||||||
final JsonArray jsElementArray = element.getAsJsonArray();
|
final JsonArray jsElementArray = element.getAsJsonArray();
|
||||||
value = processJsonArray(jsElementArray, responseCtx);
|
value = processJsonArray(jsElementArray, responseCtx);
|
||||||
|
} else if (element.isJsonNull()) {
|
||||||
|
// No further processing of null values
|
||||||
|
value = element;
|
||||||
} else {
|
} else {
|
||||||
value = resolveDependentVariable(element, responseCtx);
|
value = resolveDependentVariable(element, responseCtx);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -820,9 +820,8 @@ public final class BatchHelper {
|
|||||||
br.setRelativeUrl(String.format("v1/loans/$.loanId/transactions?command=%s", transactionCommand));
|
br.setRelativeUrl(String.format("v1/loans/$.loanId/transactions?command=%s", transactionCommand));
|
||||||
br.setMethod("POST");
|
br.setMethod("POST");
|
||||||
String dateString = date.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
String dateString = date.format(DateTimeFormatter.ofPattern("dd MMMM yyyy"));
|
||||||
br.setBody(String.format(
|
br.setBody(String.format("{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", "
|
||||||
"{\"locale\": \"en\", \"dateFormat\": \"dd MMMM yyyy\", " + "\"transactionDate\": \"%s\", \"transactionAmount\": %s}",
|
+ "\"transactionDate\": \"%s\", \"transactionAmount\": %s, \"note\":null}", dateString, amount));
|
||||||
dateString, amount));
|
|
||||||
|
|
||||||
return br;
|
return br;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user