-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'FasterXML/2.18'
- Loading branch information
Showing
4 changed files
with
27 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/kotlin/tools/jackson/module/kotlin/test/github/GitHub757.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.fasterxml.jackson.module.kotlin.test.github | ||
|
||
import com.fasterxml.jackson.databind.json.JsonMapper | ||
import com.fasterxml.jackson.module.kotlin.KotlinFeature | ||
import com.fasterxml.jackson.module.kotlin.KotlinModule | ||
import com.fasterxml.jackson.module.kotlin.convertValue | ||
import kotlin.test.Test | ||
import kotlin.test.assertNull | ||
|
||
class GitHub757 { | ||
@Test | ||
fun test() { | ||
val kotlinModule = KotlinModule.Builder() | ||
.enable(KotlinFeature.StrictNullChecks) | ||
.build() | ||
val mapper = JsonMapper.builder() | ||
.addModule(kotlinModule) | ||
.build() | ||
val convertValue = mapper.convertValue<String?>(null) | ||
assertNull(convertValue) | ||
} | ||
} |