Improve if statement on Prefilling Mapping

This commit is contained in:
George Kalampokis 2022-02-21 17:48:40 +02:00
parent b6c28be3b3
commit ad8239ca5e
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ public class PrefillingMapper {
}
JsonNode valueNode = mapper.readTree(value);
List<String> parsedValues = new ArrayList<>();
if (valueNode.isArray()) {
if (valueNode.isArray() && (!valueNode.get(0).isTextual() || !valueNode.get(0).isNull())) {
if (prefillingMapping.getSubSource() == null || prefillingMapping.getSubSource().isEmpty()) {
throw new IllegalArgumentException("Source value is an array but no subSource field have been set");
}