Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2122#discussion_r137869296
--- Diff:
nifi-commons/nifi-record-path/src/main/java/org/apache/nifi/record/path/paths/WildcardIndexPath.java
---
@@ -65,6 +65,7 @@
} else {
final Object[] array = (Object[]) value;
return IntStream.range(0, array.length)
+ .filter(index -> array[index] != null)
--- End diff --
@pvillard31 I don't think this is exactly right. The wildcard should
include all elements, including nulls. Imagine, for example, that I have some
data like:
```
{
"id" : 3,
"numbers" : [ 1, null, 4 ]
}
```
If I want to set /numbers[*] to the value 8, then I would expect to get
back:
```
{
"id" : 3,
"numbers" : [ 8, 8, 8 ]
}
```
But with this modification I'd get back
```
{
"id" : 3,
"numbers" : [ 8, null, 8 ]
}
```
---