File tree 2 files changed +8
-5
lines changed
main/java/com/fasterxml/jackson/dataformat/xml/deser
test/java/com/fasterxml/jackson/dataformat/xml/deser
2 files changed +8
-5
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 2
2
3
3
import java .util .*;
4
4
5
+ import com .fasterxml .jackson .dataformat .xml .annotation .JacksonXmlElementWrapper ;
5
6
import org .junit .Test ;
6
7
7
8
import com .fasterxml .jackson .annotation .JsonPropertyOrder ;
@@ -31,6 +32,8 @@ public void setKey(java.lang.String value) {
31
32
}
32
33
33
34
static class MetaData {
35
+ @ JacksonXmlElementWrapper (useWrapping = false )
36
+ @ JacksonXmlProperty (localName = "data" )
34
37
protected List <Data > data ;
35
38
36
39
public List <Data > getData () {
You can’t perform that action at this time.
0 commit comments