|
57 | 57 | import com.fasterxml.jackson.databind.SerializerProvider; |
58 | 58 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; |
59 | 59 | import com.fasterxml.jackson.databind.cfg.DeserializerFactoryConfig; |
| 60 | +import com.fasterxml.jackson.databind.cfg.EnumFeature; |
| 61 | +import com.fasterxml.jackson.databind.cfg.JsonNodeFeature; |
60 | 62 | import com.fasterxml.jackson.databind.cfg.SerializerFactoryConfig; |
61 | 63 | import com.fasterxml.jackson.databind.deser.BasicDeserializerFactory; |
62 | 64 | import com.fasterxml.jackson.databind.deser.Deserializers; |
@@ -455,10 +457,12 @@ void completeSetup() throws JsonMappingException { |
455 | 457 | .annotationIntrospector(current -> AnnotationIntrospector.pair(current, introspector)) |
456 | 458 | .featuresToEnable(SerializationFeature.FAIL_ON_EMPTY_BEANS, |
457 | 459 | DeserializationFeature.UNWRAP_ROOT_VALUE, |
| 460 | + EnumFeature.BOGUS_FEATURE, |
458 | 461 | JsonParser.Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER, |
459 | 462 | JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS) |
460 | 463 | .featuresToDisable(MapperFeature.AUTO_DETECT_GETTERS, |
461 | 464 | MapperFeature.AUTO_DETECT_FIELDS, |
| 465 | + JsonNodeFeature.READ_NULL_PROPERTIES, |
462 | 466 | JsonParser.Feature.AUTO_CLOSE_SOURCE, |
463 | 467 | JsonGenerator.Feature.QUOTE_FIELD_NAMES) |
464 | 468 | .serializationInclusion(JsonInclude.Include.NON_NULL); |
@@ -487,13 +491,15 @@ void completeSetup() throws JsonMappingException { |
487 | 491 |
|
488 | 492 | assertThat(mapper.getSerializationConfig().isEnabled(SerializationFeature.FAIL_ON_EMPTY_BEANS)).isTrue(); |
489 | 493 | assertThat(mapper.getDeserializationConfig().isEnabled(DeserializationFeature.UNWRAP_ROOT_VALUE)).isTrue(); |
| 494 | + assertThat(mapper.getSerializationConfig().isEnabled(EnumFeature.BOGUS_FEATURE)).isTrue(); |
490 | 495 | assertThat(mapper.getFactory().isEnabled(JsonParser.Feature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER)).isTrue(); |
491 | 496 | assertThat(mapper.getFactory().isEnabled(JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS)).isTrue(); |
492 | 497 |
|
493 | 498 | assertThat(mapper.getSerializationConfig().isEnabled(MapperFeature.AUTO_DETECT_GETTERS)).isFalse(); |
494 | 499 | assertThat(mapper.getDeserializationConfig().isEnabled(MapperFeature.DEFAULT_VIEW_INCLUSION)).isFalse(); |
495 | 500 | assertThat(mapper.getDeserializationConfig().isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)).isFalse(); |
496 | 501 | assertThat(mapper.getDeserializationConfig().isEnabled(MapperFeature.AUTO_DETECT_FIELDS)).isFalse(); |
| 502 | + assertThat(mapper.getDeserializationConfig().isEnabled(JsonNodeFeature.READ_NULL_PROPERTIES)).isFalse(); |
497 | 503 | assertThat(mapper.getFactory().isEnabled(JsonParser.Feature.AUTO_CLOSE_SOURCE)).isFalse(); |
498 | 504 | assertThat(mapper.getFactory().isEnabled(JsonGenerator.Feature.QUOTE_FIELD_NAMES)).isFalse(); |
499 | 505 | assertThat(mapper.getSerializationConfig().getSerializationInclusion()).isSameAs(JsonInclude.Include.NON_NULL); |
|
0 commit comments