Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ public SetExpressionEvaluator(JsonNodeFactory factory, FieldTreeNode context, Se
} else if (mdNode instanceof ArrayField) {
data = initializeArray(rvalue, refMdNode, mdNode, field, refPath);
}
setValues.add(data);
if (data != null) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would work, but we should also add an if statement before instanceof ArrayField (becayse ResolvedReferenceField extends ArrayField)

if(mdNode instanceof ResolvedReferenceField) {
// then, if the set-to value is null, set data to null, so it won't be added to setValues. If it is non-null, throw error, because the call is setting a reference to a non-null value.
}

setValues.add(data);
}
}
}

Expand Down