diff --git a/release-notes/CREDITS b/release-notes/CREDITS index aa17241fe..c219a0603 100644 --- a/release-notes/CREDITS +++ b/release-notes/CREDITS @@ -17,6 +17,10 @@ Authors: Contributors: +# 3.0.0-rc3 (not yet released) +WrongWrong (@k163377) +* #945: Replace JacksonXmlRootElement used in the test with JsonRootName + # 3.0.0-rc2 (not yet released) WrongWrong (@k163377) diff --git a/src/test/kotlin/tools/jackson/module/kotlin/test/github/Github153.kt b/src/test/kotlin/tools/jackson/module/kotlin/test/github/Github153.kt index f680e32e1..6270492d0 100644 --- a/src/test/kotlin/tools/jackson/module/kotlin/test/github/Github153.kt +++ b/src/test/kotlin/tools/jackson/module/kotlin/test/github/Github153.kt @@ -1,17 +1,17 @@ package tools.jackson.module.kotlin.test.github +import com.fasterxml.jackson.annotation.JsonRootName import tools.jackson.databind.exc.InvalidDefinitionException import tools.jackson.dataformat.xml.XmlMapper import tools.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty -import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement import tools.jackson.module.kotlin.kotlinModule import tools.jackson.module.kotlin.test.expectFailure import org.junit.jupiter.api.Test import kotlin.test.assertEquals class TestGithub153 { - @JacksonXmlRootElement(localName = "MyPojo") + @JsonRootName("MyPojo") class MyPojo { @JacksonXmlElementWrapper(localName = "elements") @JacksonXmlProperty(localName = "element") @@ -23,7 +23,7 @@ class TestGithub153 { var value: String? = null } - @JacksonXmlRootElement(localName = "MyPojo") + @JsonRootName("MyPojo") data class MyDataPojo ( @JacksonXmlElementWrapper(localName = "elements") @JacksonXmlProperty(localName = "element") diff --git a/src/test/kotlin/tools/jackson/module/kotlin/test/github/failing/Github138.kt b/src/test/kotlin/tools/jackson/module/kotlin/test/github/failing/Github138.kt index 928d83fbd..e1469b72e 100644 --- a/src/test/kotlin/tools/jackson/module/kotlin/test/github/failing/Github138.kt +++ b/src/test/kotlin/tools/jackson/module/kotlin/test/github/failing/Github138.kt @@ -1,10 +1,10 @@ package tools.jackson.module.kotlin.test.github.failing import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonRootName import tools.jackson.databind.exc.InvalidDefinitionException import tools.jackson.dataformat.xml.XmlMapper import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty -import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement import tools.jackson.dataformat.xml.annotation.JacksonXmlText import tools.jackson.module.kotlin.readValue import tools.jackson.module.kotlin.test.expectFailure @@ -12,7 +12,7 @@ import tools.jackson.module.kotlin.kotlinModule import org.junit.jupiter.api.Test class TestGithub138 { - @JacksonXmlRootElement(localName = "sms") + @JsonRootName("sms") @JsonIgnoreProperties(ignoreUnknown = true) data class Sms( @JacksonXmlProperty(localName = "Phone", isAttribute = true)