diff --git a/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github145.kt b/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github145.kt index 715505271..d190f7341 100644 --- a/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github145.kt +++ b/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github145.kt @@ -119,25 +119,4 @@ class TestGithub145 { val person6Json = objectMapper.readValue("""{"preName":"TestPreName","lastName":"TestLastname"}""") } - // Cannot have companion object in class declared within function - class Person7 constructor(val preName: String, val lastName: String) { - private constructor(preNameAndLastName: String) : this( - preNameAndLastName.substringBefore(","), - preNameAndLastName.substringAfter(",") - ) - - companion object { - @JsonCreator - @JvmStatic - fun createFromJson(preNameAndLastName: String): Person7 { - return Person7(preNameAndLastName) - } - } - } - - @Test - fun testPerson7() { - val person7String = objectMapper.readValue(""""TestPreName,TestLastname"""") - val person7Json = objectMapper.readValue("""{"preName":"TestPreName","lastName":"TestLastname"}""") - } } diff --git a/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/failing/Github145Failing.kt b/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/failing/Github145Failing.kt new file mode 100644 index 000000000..cef1dc1e1 --- /dev/null +++ b/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/failing/Github145Failing.kt @@ -0,0 +1,38 @@ +package com.fasterxml.jackson.module.kotlin.test.github.failing + +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper +import com.fasterxml.jackson.module.kotlin.readValue +import org.junit.Test + +/** + * Class containing now-failing tests from [com.fasterxml.jackson.module.kotlin.test.github.TestGithub145], + * since "Rewrite Bean Property Introspection logic in Jackson 2.x #4515" from + * [jackson-databind#4515](https://github.com/FasterXML/jackson-databind/issues/4515) was completed. + */ +@Suppress("UNUSED_VARIABLE") +class Github145Failing { + + private val objectMapper = jacksonObjectMapper() + + // Cannot have companion object in class declared within function + class Person7 constructor(val preName: String, val lastName: String) { + private constructor(preNameAndLastName: String) : this( + preNameAndLastName.substringBefore(","), + preNameAndLastName.substringAfter(",") + ) + + companion object { + @JsonCreator + @JvmStatic + fun createFromJson(preNameAndLastName: String): Person7 { + return Person7(preNameAndLastName) + } + } + } + + @Test + fun testPerson7() { + val person7Json = objectMapper.readValue("""{"preName":"TestPreName","lastName":"TestLastname"}""") + } +} \ No newline at end of file