11package com.fasterxml.jackson.module.kotlin.test
22
3+ import com.fasterxml.jackson.databind.exc.InvalidNullException
34import com.fasterxml.jackson.module.kotlin.KotlinFeature
4- import com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException
55import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
66import com.fasterxml.jackson.module.kotlin.readValue
77import org.junit.jupiter.api.Assertions.assertArrayEquals
@@ -32,7 +32,7 @@ class StrictNullChecksTestOld {
3232
3333 @Test
3434 fun testListOfInt () {
35- assertThrows<MissingKotlinParameterException > {
35+ assertThrows<InvalidNullException > {
3636 val json = """ {"samples":[1, null]}"""
3737 mapper.readValue<ClassWithListOfInt >(json)
3838 }
@@ -62,7 +62,7 @@ class StrictNullChecksTestOld {
6262
6363 @Test
6464 fun testArrayOfInt () {
65- assertThrows<MissingKotlinParameterException > {
65+ assertThrows<InvalidNullException > {
6666 val json = """ {"samples":[1, null]}"""
6767 mapper.readValue<ClassWithArrayOfInt >(json)
6868 }
@@ -92,7 +92,7 @@ class StrictNullChecksTestOld {
9292
9393 @Test
9494 fun testMapOfStringToIntWithNullValue () {
95- assertThrows<MissingKotlinParameterException > {
95+ assertThrows<InvalidNullException > {
9696 val json = """ { "samples": { "key": null } }"""
9797 mapper.readValue<ClassWithMapOfStringToInt >(json)
9898 }
@@ -121,7 +121,7 @@ class StrictNullChecksTestOld {
121121 @Disabled // this is a hard problem to solve and is currently not addressed
122122 @Test
123123 fun testListOfGenericWithNullValue () {
124- assertThrows<MissingKotlinParameterException > {
124+ assertThrows<InvalidNullException > {
125125 val json = """ {"samples":[1, null]}"""
126126 mapper.readValue<TestClass <List <Int >>>(json)
127127 }
@@ -137,7 +137,7 @@ class StrictNullChecksTestOld {
137137 @Disabled // this is a hard problem to solve and is currently not addressed
138138 @Test
139139 fun testMapOfGenericWithNullValue () {
140- assertThrows<MissingKotlinParameterException > {
140+ assertThrows<InvalidNullException > {
141141 val json = """ { "samples": { "key": null } }"""
142142 mapper.readValue<TestClass <Map <String , Int >>>(json)
143143 }
@@ -153,7 +153,7 @@ class StrictNullChecksTestOld {
153153 @Disabled // this is a hard problem to solve and is currently not addressed
154154 @Test
155155 fun testArrayOfGenericWithNullValue () {
156- assertThrows<MissingKotlinParameterException > {
156+ assertThrows<InvalidNullException > {
157157 val json = """ {"samples":[1, null]}"""
158158 mapper.readValue<TestClass <Array <Int >>>(json)
159159 }
0 commit comments