Skip to content

Commit

Permalink
Use zero-copy ArrayValue from array constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
akudiyar committed Nov 16, 2023
1 parent 83db800 commit dd694c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public ArrayValue toValue(Collection<?> object) {
for (Object value : object) {
values[i++] = value == null ? ValueFactory.newNil() : mapper.toValue(value);
}
return ValueFactory.newArray(values, false);
return ValueFactory.newArray(values, true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ public ArrayValue toValue(List<?> object) {
for (Object value : object) {
values[i++] = value == null ? ValueFactory.newNil() : mapper.toValue(value);
}
return ValueFactory.newArray(values, false);
return ValueFactory.newArray(values, true);
}
}

0 comments on commit dd694c9

Please sign in to comment.