Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #783 #784

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix for #783 #784

wants to merge 2 commits into from

Conversation

paterczm
Copy link
Contributor

A hint on what the problem with #783 might be. Didn't test it.

@@ -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.
}

@paterczm paterczm changed the title Fix for #783? Unit test needed. Fix for #783 Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants