@@ -40,9 +40,6 @@ static class Car
4040 CAR .properties = CAR_PROPERTIES ;
4141 }
4242
43- private final JsonInclude .Value BOTH_NON_NULL = JsonInclude .Value .construct (JsonInclude .Include .NON_NULL ,
44- JsonInclude .Include .NON_NULL );
45-
4643// final private ObjectMapper MAPPER = newJsonMapper();
4744
4845 // [databind#2572]
@@ -51,7 +48,7 @@ public void test2572MapDefault() throws Exception
5148 {
5249
5350 ObjectMapper mapper = JsonMapper .builder ()
54- .defaultPropertyInclusion (BOTH_NON_NULL )
51+ .defaultPropertyInclusion (JsonInclude . Value . ALL_NON_NULL )
5552 .build ();
5653 assertEquals (a2q ("{'Speed':100}" ),
5754 mapper .writeValueAsString (CAR_PROPERTIES ));
@@ -64,7 +61,7 @@ public void test2572MapDefault() throws Exception
6461 public void test2572MapOverrideUseDefaults () throws Exception
6562 {
6663 ObjectMapper mapper = JsonMapper .builder ()
67- .defaultPropertyInclusion (BOTH_NON_NULL )
64+ .defaultPropertyInclusion (JsonInclude . Value . ALL_NON_NULL )
6865 .build ();
6966 mapper .configOverride (Map .class )
7067 .setInclude (JsonInclude .Value .construct (JsonInclude .Include .USE_DEFAULTS ,
@@ -80,7 +77,7 @@ public void test2572MapOverrideUseDefaults() throws Exception
8077 public void test2572MapOverrideInclAlways () throws Exception
8178 {
8279 ObjectMapper mapper = JsonMapper .builder ()
83- .defaultPropertyInclusion (BOTH_NON_NULL )
80+ .defaultPropertyInclusion (JsonInclude . Value . ALL_NON_NULL )
8481 .build ();
8582 mapper .configOverride (Map .class )
8683 .setInclude (JsonInclude .Value .construct (JsonInclude .Include .ALWAYS ,
0 commit comments