Skip to content

Commit 7dc5c25

Browse files
committed
Merge branch '2.16'
2 parents 76913a1 + 4955f31 commit 7dc5c25

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

release-notes/VERSION-2.x

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ JSON library.
2727
(reported by Chris R)
2828
#1003: Add FastDoubleParser section to `NOTICE`
2929
#1014: Increase default max allowed String value length from 5 megs to 20 megs
30+
#1023: Problem with `FilteringGeneratorDelegate` wrt `TokenFilter.Inclusion.INCLUDE_NON_NULL`
31+
(reported by @honhimW)
3032

3133
2.15.0 (23-Apr-2023)
3234

src/main/java/tools/jackson/core/filter/FilteringGeneratorDelegate.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,10 @@ public JsonGenerator writeStartArray(Object currValue, int size) throws JacksonE
233233
_checkParentPath();
234234
_filterContext = _filterContext.createChildArrayContext(_itemFilter, currValue, true);
235235
delegate.writeStartArray(currValue, size);
236+
} else if (_itemFilter != null && _inclusion == Inclusion.INCLUDE_NON_NULL) {
237+
_checkParentPath(false /* isMatch */);
238+
_filterContext = _filterContext.createChildArrayContext(_itemFilter, currValue, true);
239+
delegate.writeStartArray(currValue, size);
236240
} else {
237241
_filterContext = _filterContext.createChildArrayContext(_itemFilter, currValue, false);
238242
}

0 commit comments

Comments
 (0)