@@ -52,7 +52,7 @@ public static class Container {
5252 public static interface Contained { }
5353
5454 public static class ContainedImpl implements Contained { }
55-
55+
5656 /*
5757 /**********************************************************
5858 /* Test methods
@@ -157,7 +157,7 @@ void testSerGeneric() throws Exception {
157157 void testSerOptDefault () throws Exception {
158158 JsonNullableData data = new JsonNullableData ();
159159 data .myString = JsonNullable .undefined ();
160- String value = mapperWithModule ().setSerializationInclusion (
160+ String value = mapperWithModule ().setDefaultPropertyInclusion (
161161 JsonInclude .Include .ALWAYS ).writeValueAsString (data );
162162 assertEquals ("{}" , value );
163163 }
@@ -166,7 +166,7 @@ void testSerOptDefault() throws Exception {
166166 void testSerOptNull () throws Exception {
167167 JsonNullableData data = new JsonNullableData ();
168168 data .myString = null ;
169- String value = mapperWithModule ().setSerializationInclusion (
169+ String value = mapperWithModule ().setDefaultPropertyInclusion (
170170 JsonInclude .Include .NON_NULL ).writeValueAsString (data );
171171 assertEquals ("{}" , value );
172172 }
@@ -175,7 +175,7 @@ void testSerOptNull() throws Exception {
175175 void testSerOptNullNulled () throws Exception {
176176 JsonNullableData data = new JsonNullableData ();
177177 data .myString = JsonNullable .of (null );
178- String value = mapperWithModule ().setSerializationInclusion (
178+ String value = mapperWithModule ().setDefaultPropertyInclusion (
179179 JsonInclude .Include .NON_NULL ).writeValueAsString (data );
180180 assertEquals ("{\" myString\" :null}" , value );
181181 }
@@ -186,26 +186,26 @@ void testSerOptAbsent() throws Exception {
186186 data .myString = JsonNullable .undefined ();
187187
188188 ObjectMapper mapper = mapperWithModule ()
189- .setSerializationInclusion (JsonInclude .Include .NON_NULL );
189+ .setDefaultPropertyInclusion (JsonInclude .Include .NON_NULL );
190190
191191 assertEquals ("{}" , mapper .writeValueAsString (data ));
192192
193193 // but do exclude with NON_EMPTY
194194 mapper = mapperWithModule ()
195- .setSerializationInclusion (JsonInclude .Include .NON_EMPTY );
195+ .setDefaultPropertyInclusion (JsonInclude .Include .NON_EMPTY );
196196 assertEquals ("{}" , mapper .writeValueAsString (data ));
197197
198198 // and with new (2.6) NON_ABSENT
199199 mapper = mapperWithModule ()
200- .setSerializationInclusion (JsonInclude .Include .NON_ABSENT );
200+ .setDefaultPropertyInclusion (JsonInclude .Include .NON_ABSENT );
201201 assertEquals ("{}" , mapper .writeValueAsString (data ));
202202 }
203203
204204 @ Test
205205 void testSerOptAbsentNull () throws Exception {
206206 JsonNullableData data = new JsonNullableData ();
207207 data .myString = JsonNullable .of (null );
208- String value = mapperWithModule ().setSerializationInclusion (
208+ String value = mapperWithModule ().setDefaultPropertyInclusion (
209209 JsonInclude .Include .NON_ABSENT ).writeValueAsString (data );
210210 assertEquals ("{\" myString\" :null}" , value );
211211 }
@@ -214,7 +214,7 @@ void testSerOptAbsentNull() throws Exception {
214214 void testSerOptNonEmpty () throws Exception {
215215 JsonNullableData data = new JsonNullableData ();
216216 data .myString = null ;
217- String value = mapperWithModule ().setSerializationInclusion (
217+ String value = mapperWithModule ().setDefaultPropertyInclusion (
218218 JsonInclude .Include .NON_EMPTY ).writeValueAsString (data );
219219 assertEquals ("{}" , value );
220220 }
@@ -224,7 +224,7 @@ void testWithTypingEnabled() throws Exception {
224224 final ObjectMapper objectMapper = mapperWithModule ();
225225 // ENABLE TYPING
226226 objectMapper
227- .enableDefaultTyping ( ObjectMapper .DefaultTyping .OBJECT_AND_NON_CONCRETE );
227+ .activateDefaultTyping ( objectMapper . getPolymorphicTypeValidator (), ObjectMapper .DefaultTyping .OBJECT_AND_NON_CONCRETE );
228228
229229 final JsonNullableData myData = new JsonNullableData ();
230230 myData .myString = JsonNullable .of ("abc" );
@@ -287,4 +287,4 @@ void testPolymorphic() throws Exception {
287287 assertTrue (fromJson .contained .isPresent ());
288288 assertSame (ContainedImpl .class , fromJson .contained .get ().getClass ());
289289 }
290- }
290+ }
0 commit comments