File tree 4 files changed +29
-3
lines changed
main/java/com/fasterxml/jackson/dataformat/xml/deser
test/java/com/fasterxml/jackson/dataformat/xml/deser
4 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,16 @@ Motonori IWAMURO (@vmi)
244
244
`XmlBeanSerializerBase#serializeFieldsFiltered()`
245
245
(2.16.1 )
246
246
247
+ Dennis Cornwell (@cornwe19)
248
+
249
+ * Reported #509 : Exception when parsing `List`s of mixed content (since 2.13.0 )
250
+ (2.16.3 )
251
+
252
+ Christopher R. Wicks (@wickstopher)
253
+
254
+ * Contributed fix for #509 : Exception when parsing `List`s of mixed content (since 2.13.0 )
255
+ (2.16.3 )
256
+
247
257
Arthur Chan (@arthurscchan)
248
258
249
259
* Reported, contributed fix for #618 : `ArrayIndexOutOfBoundsException` thrown for invalid
Original file line number Diff line number Diff line change @@ -33,6 +33,12 @@ No changes since 2.17
33
33
( contributed by Alex H)
34
34
* Upgrade Woodstox to 6.6.1 (latest at the time)
35
35
36
+ 2.16.3 (not yet released)
37
+
38
+ #509 : Exception when parsing `List`s of mixed content (since 2.13.0 )
39
+ (reported by Dennis C)
40
+ (fix contributed by Christopher R. W)
41
+
36
42
2.16.2 (09 -Mar-2024 )
37
43
38
44
No changes since 2.16.1
Original file line number Diff line number Diff line change @@ -881,9 +881,17 @@ public JsonToken nextToken() throws IOException
881
881
}
882
882
// 29-Mar-2021, tatu: This seems like an error condition...
883
883
// How should we indicate it? As of 2.13, report as unexpected state
884
+ /*
884
885
throw _constructError(
885
- "Unexpected non-whitespace text ('" +_currText +"' in Array context: should not occur (or should be handled)"
886
+ "Unexpected non-whitespace text ('"+_currText+"') in Array context: should not occur (or should be handled)"
886
887
);
888
+ */
889
+
890
+ // [dataformat-xml#509] 2.13 introduced a defect in which an Exception was thrown above, breaking
891
+ // parsing of mixed content arrays (https://github.com/FasterXML/jackson-dataformat-xml/issues/509).
892
+ // This exception case was removed to enable continued support of that functionality, but more
893
+ // robust state handling may be in order.
894
+ // See comment https://github.com/FasterXML/jackson-dataformat-xml/pull/604
887
895
}
888
896
889
897
// If not a leaf (or otherwise ignorable), need to transform into property...
Original file line number Diff line number Diff line change 1
- package com .fasterxml .jackson .dataformat .xml .failing ;
1
+ package com .fasterxml .jackson .dataformat .xml .deser ;
2
2
3
3
import java .util .*;
4
4
5
5
import org .junit .Test ;
6
6
7
7
import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
8
-
9
8
import com .fasterxml .jackson .dataformat .xml .XmlMapper ;
9
+ import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlElementWrapper ;
10
10
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlProperty ;
11
11
import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlText ;
12
12
@@ -31,6 +31,8 @@ public void setKey(java.lang.String value) {
31
31
}
32
32
33
33
static class MetaData {
34
+ @ JacksonXmlElementWrapper (useWrapping = false )
35
+ @ JacksonXmlProperty (localName = "data" )
34
36
protected List <Data > data ;
35
37
36
38
public List <Data > getData () {
You can’t perform that action at this time.
0 commit comments