Skip to content

Commit

Permalink
Fix #1023 (#1025)
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 16, 2023
1 parent 0c83508 commit c1b6b7d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ JSON library.
(reported by Chris R)
#1003: Add FastDoubleParser section to `NOTICE`
#1014: Increase default max allowed String value length from 5 megs to 20 megs
#1023: Problem with `FilteringGeneratorDelegate` wrt `TokenFilter.Inclusion.INCLUDE_NON_NULL`
(reported by @honhimW)

2.15.0 (23-Apr-2023)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ public void writeStartArray(Object forValue) throws IOException
_checkParentPath();
_filterContext = _filterContext.createChildArrayContext(_itemFilter, true);
delegate.writeStartArray(forValue);
} else if (_itemFilter != null && _inclusion == Inclusion.INCLUDE_NON_NULL) {
_checkParentPath(false /* isMatch */);
_filterContext = _filterContext.createChildArrayContext(_itemFilter, true);
delegate.writeStartArray(forValue);
} else {
_filterContext = _filterContext.createChildArrayContext(_itemFilter, false);
}
Expand Down Expand Up @@ -283,6 +287,10 @@ public void writeStartArray(Object forValue, int size) throws IOException
_checkParentPath();
_filterContext = _filterContext.createChildArrayContext(_itemFilter, true);
delegate.writeStartArray(forValue, size);
} else if (_itemFilter != null && _inclusion == Inclusion.INCLUDE_NON_NULL) {
_checkParentPath(false /* isMatch */);
_filterContext = _filterContext.createChildArrayContext(_itemFilter, true);
delegate.writeStartArray(forValue, size);
} else {
_filterContext = _filterContext.createChildArrayContext(_itemFilter, false);
}
Expand Down

0 comments on commit c1b6b7d

Please sign in to comment.