File tree Expand file tree Collapse file tree 3 files changed +27
-1
lines changed
src/test/java/com/fasterxml/jackson/dataformat/xml/misc Expand file tree Collapse file tree 3 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ Some data-binding types overridden as well (ObjectMapper sub-classed as XmlMappe
92
92
<dependency >
93
93
<groupId >com.fasterxml.woodstox</groupId >
94
94
<artifactId >woodstox-core</artifactId >
95
- <version >6.2.1 </version >
95
+ <version >6.2.3 </version >
96
96
<exclusions >
97
97
<exclusion >
98
98
<groupId >javax.xml.stream</groupId >
Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ Project: jackson-dataformat-xml
52
52
#412 : Coercion from element-with-attribute-and -text only works for `String`,
53
53
not other scalar types
54
54
- Add Gradle Module Metadata (https:// blog.gradle.org/alignment-with-gradle-module-metadata)
55
+ - Upgrade Woodstox dependency to 6.2.3 (<- 6.2.1 )
55
56
56
57
2.11.3 (02 -Oct-2020 )
57
58
2.11.2 (02 -Aug-2020 )
Original file line number Diff line number Diff line change
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
+ }
You can’t perform that action at this time.
0 commit comments