1- package com .fasterxml .jackson .core .tofix ;
1+ package com .fasterxml .jackson .core .filter ;
22
33import org .junit .jupiter .api .Test ;
44
55import com .fasterxml .jackson .core .*;
6- import com .fasterxml .jackson .core .filter .FilteringParserDelegate ;
7- import com .fasterxml .jackson .core .filter .TokenFilter ;
86import com .fasterxml .jackson .core .filter .TokenFilter .Inclusion ;
9- import com .fasterxml .jackson .core .testutil .failure .JacksonTestFailureExpected ;
107
118import static org .junit .jupiter .api .Assertions .assertNull ;
129
@@ -17,7 +14,17 @@ class ParserFilterEmpty708Test extends JUnit5TestBase
1714 static class IncludeAllFilter extends TokenFilter {
1815 @ Override
1916 public TokenFilter includeProperty (String name ) {
20- return this ;
17+ return TokenFilter .INCLUDE_ALL ;
18+ }
19+
20+ @ Override
21+ public boolean includeEmptyArray (boolean contentsFiltered ) {
22+ return true ;
23+ }
24+
25+ @ Override
26+ public boolean includeEmptyObject (boolean contentsFiltered ) {
27+ return true ;
2128 }
2229 }
2330
@@ -30,12 +37,10 @@ public TokenFilter includeProperty(String name) {
3037 private final JsonFactory JSON_F = newStreamFactory ();
3138
3239 // [core#708]
33- @ JacksonTestFailureExpected
3440 @ Test
3541 void emptyArray () throws Exception
3642 {
3743 final String json = "[ ]" ;
38- // should become: {"value":12}
3944 JsonParser p0 = _createParser (JSON_F , json );
4045 JsonParser p = new FilteringParserDelegate (p0 ,
4146 new IncludeAllFilter (),
@@ -50,12 +55,10 @@ void emptyArray() throws Exception
5055 }
5156
5257 // [core#708]
53- @ JacksonTestFailureExpected
5458 @ Test
5559 void emptyObject () throws Exception
5660 {
5761 final String json = "{ }" ;
58- // should become: {"value":12}
5962 JsonParser p0 = _createParser (JSON_F , json );
6063 JsonParser p = new FilteringParserDelegate (p0 ,
6164 new IncludeAllFilter (),
0 commit comments