@@ -3,7 +3,7 @@ package tools.jackson.module.scala.deser
3
3
import com .fasterxml .jackson .annotation .JsonCreator
4
4
import com .fasterxml .jackson .annotation .JsonCreator .Mode
5
5
import tools .jackson .core .`type` .TypeReference
6
- import tools .jackson .databind .{JsonNode , MapperFeature , ObjectMapper }
6
+ import tools .jackson .databind .{DeserializationFeature , JsonNode , MapperFeature , ObjectMapper }
7
7
import tools .jackson .databind .json .JsonMapper
8
8
import tools .jackson .databind .node .IntNode
9
9
import tools .jackson .module .scala .introspect .ScalaAnnotationIntrospectorModule
@@ -178,6 +178,7 @@ class CreatorTest extends DeserializationFixture {
178
178
.build()
179
179
val mapper = initBuilder()
180
180
.addModule(scalaModule)
181
+ .configure(DeserializationFeature .FAIL_ON_NULL_FOR_PRIMITIVES , false )
181
182
.build()
182
183
val deser = mapper.readValue(""" {}""" , classOf [ConstructorWithDefaultValues ])
183
184
deser.s shouldEqual null
@@ -195,6 +196,7 @@ class CreatorTest extends DeserializationFixture {
195
196
.build()
196
197
val mapper = initBuilder()
197
198
.addModule(scalaModule)
199
+ .configure(DeserializationFeature .FAIL_ON_NULL_FOR_PRIMITIVES , false )
198
200
.build()
199
201
val deser = mapper.readValue(""" {}""" , classOf [ConstructorWithDefaultValues ])
200
202
deser.s shouldEqual null
@@ -208,6 +210,7 @@ class CreatorTest extends DeserializationFixture {
208
210
it should " ignore default values (when MapperFeature is overridden)" in { _ =>
209
211
val builder = initBuilder()
210
212
.disable(MapperFeature .APPLY_DEFAULT_VALUES )
213
+ .configure(DeserializationFeature .FAIL_ON_NULL_FOR_PRIMITIVES , false )
211
214
.addModule(DefaultScalaModule )
212
215
val mapper = builder.build()
213
216
val deser = mapper.readValue(""" {}""" , classOf [ConstructorWithDefaultValues ])
0 commit comments