File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
src/test/kotlin/tools/jackson/module/kotlin/test/github Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ Authors:
1717
1818Contributors:
1919
20+ # 3.0.0-rc3 (not yet released)
21+ WrongWrong (@k163377)
22+ * #945: Replace JacksonXmlRootElement used in the test with JsonRootName
23+
2024# 3.0.0-rc2 (not yet released)
2125
2226WrongWrong (@k163377)
Original file line number Diff line number Diff line change 11package tools.jackson.module.kotlin.test.github
22
3+ import com.fasterxml.jackson.annotation.JsonRootName
34import tools.jackson.databind.exc.InvalidDefinitionException
45import tools.jackson.dataformat.xml.XmlMapper
56import tools.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper
67import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty
7- import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement
88import tools.jackson.module.kotlin.kotlinModule
99import tools.jackson.module.kotlin.test.expectFailure
1010import org.junit.jupiter.api.Test
1111import kotlin.test.assertEquals
1212
1313class TestGithub153 {
14- @JacksonXmlRootElement(localName = " MyPojo" )
14+ @JsonRootName( " MyPojo" )
1515 class MyPojo {
1616 @JacksonXmlElementWrapper(localName = " elements" )
1717 @JacksonXmlProperty(localName = " element" )
@@ -23,7 +23,7 @@ class TestGithub153 {
2323 var value: String? = null
2424 }
2525
26- @JacksonXmlRootElement(localName = " MyPojo" )
26+ @JsonRootName( " MyPojo" )
2727 data class MyDataPojo (
2828 @JacksonXmlElementWrapper(localName = " elements" )
2929 @JacksonXmlProperty(localName = " element" )
Original file line number Diff line number Diff line change 11package tools.jackson.module.kotlin.test.github.failing
22
33import com.fasterxml.jackson.annotation.JsonIgnoreProperties
4+ import com.fasterxml.jackson.annotation.JsonRootName
45import tools.jackson.databind.exc.InvalidDefinitionException
56import tools.jackson.dataformat.xml.XmlMapper
67import tools.jackson.dataformat.xml.annotation.JacksonXmlProperty
7- import tools.jackson.dataformat.xml.annotation.JacksonXmlRootElement
88import tools.jackson.dataformat.xml.annotation.JacksonXmlText
99import tools.jackson.module.kotlin.readValue
1010import tools.jackson.module.kotlin.test.expectFailure
1111import tools.jackson.module.kotlin.kotlinModule
1212import org.junit.jupiter.api.Test
1313
1414class TestGithub138 {
15- @JacksonXmlRootElement(localName = " sms" )
15+ @JsonRootName( " sms" )
1616 @JsonIgnoreProperties(ignoreUnknown = true )
1717 data class Sms (
1818 @JacksonXmlProperty(localName = " Phone" , isAttribute = true )
You can’t perform that action at this time.
0 commit comments