1
1
package com.fasterxml.jackson.module.kotlin.test
2
2
3
+ import com.fasterxml.jackson.databind.exc.InvalidNullException
3
4
import com.fasterxml.jackson.module.kotlin.KotlinFeature
4
- import com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException
5
5
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
6
6
import com.fasterxml.jackson.module.kotlin.readValue
7
7
import org.junit.jupiter.api.Assertions.assertArrayEquals
@@ -32,7 +32,7 @@ class StrictNullChecksTestOld {
32
32
33
33
@Test
34
34
fun testListOfInt () {
35
- assertThrows<MissingKotlinParameterException > {
35
+ assertThrows<InvalidNullException > {
36
36
val json = """ {"samples":[1, null]}"""
37
37
mapper.readValue<ClassWithListOfInt >(json)
38
38
}
@@ -62,7 +62,7 @@ class StrictNullChecksTestOld {
62
62
63
63
@Test
64
64
fun testArrayOfInt () {
65
- assertThrows<MissingKotlinParameterException > {
65
+ assertThrows<InvalidNullException > {
66
66
val json = """ {"samples":[1, null]}"""
67
67
mapper.readValue<ClassWithArrayOfInt >(json)
68
68
}
@@ -92,7 +92,7 @@ class StrictNullChecksTestOld {
92
92
93
93
@Test
94
94
fun testMapOfStringToIntWithNullValue () {
95
- assertThrows<MissingKotlinParameterException > {
95
+ assertThrows<InvalidNullException > {
96
96
val json = """ { "samples": { "key": null } }"""
97
97
mapper.readValue<ClassWithMapOfStringToInt >(json)
98
98
}
@@ -121,7 +121,7 @@ class StrictNullChecksTestOld {
121
121
@Disabled // this is a hard problem to solve and is currently not addressed
122
122
@Test
123
123
fun testListOfGenericWithNullValue () {
124
- assertThrows<MissingKotlinParameterException > {
124
+ assertThrows<InvalidNullException > {
125
125
val json = """ {"samples":[1, null]}"""
126
126
mapper.readValue<TestClass <List <Int >>>(json)
127
127
}
@@ -137,7 +137,7 @@ class StrictNullChecksTestOld {
137
137
@Disabled // this is a hard problem to solve and is currently not addressed
138
138
@Test
139
139
fun testMapOfGenericWithNullValue () {
140
- assertThrows<MissingKotlinParameterException > {
140
+ assertThrows<InvalidNullException > {
141
141
val json = """ { "samples": { "key": null } }"""
142
142
mapper.readValue<TestClass <Map <String , Int >>>(json)
143
143
}
@@ -153,7 +153,7 @@ class StrictNullChecksTestOld {
153
153
@Disabled // this is a hard problem to solve and is currently not addressed
154
154
@Test
155
155
fun testArrayOfGenericWithNullValue () {
156
- assertThrows<MissingKotlinParameterException > {
156
+ assertThrows<InvalidNullException > {
157
157
val json = """ {"samples":[1, null]}"""
158
158
mapper.readValue<TestClass <Array <Int >>>(json)
159
159
}
0 commit comments