Skip to content

Commit 7fdb1a4

Browse files
committed
Merge branch '2.11' into 2.12
2 parents e9a2079 + 031aa5e commit 7fdb1a4

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe
9292
<dependency>
9393
<groupId>com.fasterxml.woodstox</groupId>
9494
<artifactId>woodstox-core</artifactId>
95-
<version>6.2.1</version>
95+
<version>6.2.3</version>
9696
<exclusions>
9797
<exclusion>
9898
<groupId>javax.xml.stream</groupId>

release-notes/VERSION-2.x

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ Project: jackson-dataformat-xml
5252
#412: Coercion from element-with-attribute-and-text only works for `String`,
5353
not other scalar types
5454
- Add Gradle Module Metadata (https://blog.gradle.org/alignment-with-gradle-module-metadata)
55+
- Upgrade Woodstox dependency to 6.2.3 (<- 6.2.1)
5556

5657
2.11.3 (02-Oct-2020)
5758
2.11.2 (02-Aug-2020)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package com.fasterxml.jackson.dataformat.xml.misc;
2+
3+
import java.util.Map;
4+
5+
import com.fasterxml.jackson.databind.ObjectMapper;
6+
7+
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
8+
9+
// [dataformat-xml#428]: problem with an encoding supported via JDK
10+
public class BadEncodingTest extends XmlTestBase
11+
{
12+
// private static final String xml = "<?xml version='1.0' encoding='WINDOWS-1252'?><x/>";
13+
private static final String xml = "<?xml version='1.0' encoding='WINDOWS-1252'?><x/>";
14+
15+
private final ObjectMapper XML_MAPPER = newMapper();
16+
17+
public void testEncoding() throws Exception {
18+
final byte[] b = xml.getBytes("UTF-8");
19+
assertNotNull(XML_MAPPER.readValue(b, Map.class));
20+
21+
// try (InputStream in = new ByteArrayInputStream(b)) {
22+
// XML_MAPPER.readValue(in, Map.class);
23+
// }
24+
}
25+
}

0 commit comments

Comments
 (0)