File tree 2 files changed +9
-7
lines changed
main/java/com/fasterxml/jackson/dataformat/xml/deser
test/java/com/fasterxml/jackson/dataformat/xml/deser
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -845,11 +845,11 @@ public JsonToken nextToken() throws IOException
845
845
token = _nextToken ();
846
846
continue ;
847
847
}
848
- // 29-Mar-2021, tatu: This seems like an error condition...
849
- // How should we indicate it? As of 2.13, report as unexpected state
850
- throw _constructError (
851
- "Unexpected non-whitespace text ('" + _currText + "' in Array context: should not occur (or should be handled)"
852
- );
848
+ // [dataformat-xml#509] 2.13 introduced a defect in which an Exception was thrown here, breaking
849
+ // parsing of mixed content arrays (https://github.com/FasterXML/jackson-dataformat-xml/issues/509).
850
+ // This exception case was removed to enable continued support of that functionality, but more
851
+ // robust state handling may be in order.
852
+ // See comment https://github.com/FasterXML/jackson-dataformat-xml/pull/604#issuecomment-1770080319
853
853
}
854
854
855
855
// 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