Mark Payne created NIFI-4368:
--------------------------------
Summary: UpdateRecord fails if attempting to set a particular
array element to some other value
Key: NIFI-4368
URL: https://issues.apache.org/jira/browse/NIFI-4368
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Reporter: Mark Payne
Assignee: Mark Payne
I have the following record:
{code}
{
"id" : 3,
"numbers" : [1, 2, 3]
}
{code}
I tried using UpdateRecord with a property name of "/numbers[1]" and a literal
value of "8" but
the data was not modified. It appears to be due to the fact that the
ArrayIndexFieldValue class uses the following code:
{code}
@Override
public void updateValue(final Object newValue) {
getParentRecord().get().setArrayValue(getField().getFieldName(),
getArrayIndex(), newValue);
}
{code}
But the field was constructed using a field name of "numbers[1]" instead of
"numbers".
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)