Skip to content

Commit 6b549f0

Browse files
committed
Simplify construction of Jackson XML mapper slightly (for test wrt issue 396); update release notes wrt 2.12.0
1 parent c38dc31 commit 6b549f0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

release-notes/VERSION-2.x

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ Co-maintainers:
1616

1717
2.12.1 (not yet released)
1818

19-
#356: Serialization of inline classes under Kotlin 1.4+
2019
#402: Remove implicitly-included `java.base` dep in `module-info.java`
2120
(reported by UkonnRa@github)
2221

2322
2.12.0 (29-Nov-2020)
2423

2524
#322: Added extension methods to SimpleModule addSerializer and addDeserializer to support KClass arguments
2625
that register the serializer/deserializer for both the java type and java class.
26+
#356: Kotlin 1.4 support
2727
#385: Add Moditect, source module info, to allow Kotlin module usage with Java Module system
2828
- Add Gradle Module Metadata (https://blog.gradle.org/alignment-with-gradle-module-metadata)
2929

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/failing/Github396.kt

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.fasterxml.jackson.module.kotlin.test.failing
22

3-
import com.fasterxml.jackson.dataformat.xml.JacksonXmlModule
4-
import com.fasterxml.jackson.dataformat.xml.XmlFactory
53
import com.fasterxml.jackson.dataformat.xml.XmlMapper
64
import com.fasterxml.jackson.module.kotlin.registerKotlinModule
7-
import javax.xml.stream.XMLInputFactory
85
import kotlin.test.Test
96
import kotlin.test.assertEquals
107

@@ -15,8 +12,7 @@ class TestGithub396 {
1512
*/
1613
@Test
1714
fun testMissingConstructor() {
18-
val factory = XmlFactory(XMLInputFactory.newInstance())
19-
val mapper = XmlMapper(factory, JacksonXmlModule()).registerKotlinModule()
15+
val mapper = XmlMapper().registerKotlinModule()
2016

2117
val xml = "<product><stuff></stuff></product>"
2218
val product: Product = mapper.readValue(xml, Product::class.java)

0 commit comments

Comments
 (0)