File tree 1 file changed +10
-3
lines changed
src/test/scala/tools/jackson/module/scala/deser
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ package tools.jackson.module.scala.deser
2
2
3
3
import com .fasterxml .jackson .annotation .JsonMerge
4
4
import tools .jackson .core .`type` .TypeReference
5
- import tools .jackson .databind .{ObjectMapper , ObjectReader }
5
+ import tools .jackson .databind .{MapperFeature , ObjectMapper , ObjectReader }
6
6
import tools .jackson .module .scala .DefaultScalaModule
7
7
8
8
import scala .collection .{Map , mutable }
@@ -17,9 +17,16 @@ class MergeTest extends DeserializerTest {
17
17
18
18
val module : DefaultScalaModule .type = DefaultScalaModule
19
19
20
- def newScalaMapper : ObjectMapper = newMapper
20
+ // This test replies on enabling MapperFeature.ALLOW_FINAL_FIELDS_AS_MUTATORS
21
+ // which is not enabled by default in the Jackson v2 but not in Jackson v3
22
+ def newScalaMapper : ObjectMapper = newBuilder
23
+ .enable(MapperFeature .ALLOW_FINAL_FIELDS_AS_MUTATORS )
24
+ .build()
21
25
22
- def newMergeableScalaMapper : ObjectMapper = newBuilder.defaultMergeable(true ).build()
26
+ def newMergeableScalaMapper : ObjectMapper = newBuilder
27
+ .enable(MapperFeature .ALLOW_FINAL_FIELDS_AS_MUTATORS )
28
+ .defaultMergeable(true )
29
+ .build()
23
30
24
31
behavior of " The DefaultScalaModule when reading for updating"
25
32
You can’t perform that action at this time.
0 commit comments