Skip to content

Commit

Permalink
Merge branch '2.16' into 2.17
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed May 10, 2024
2 parents 120b2bb + c3b48f3 commit d05688e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
10 changes: 10 additions & 0 deletions release-notes/CREDITS-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,16 @@ Motonori IWAMURO (@vmi)
`XmlBeanSerializerBase#serializeFieldsFiltered()`
(2.16.1)

Dennis Cornwell (@cornwe19)

* Reported #509: Exception when parsing `List`s of mixed content (since 2.13.0)
(2.16.3)

Christopher R. Wicks (@wickstopher)

* Contributed fix for #509: Exception when parsing `List`s of mixed content (since 2.13.0)
(2.16.3)

Arthur Chan (@arthurscchan)

* Reported, contributed fix for #618: `ArrayIndexOutOfBoundsException` thrown for invalid
Expand Down
6 changes: 6 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ No changes since 2.17
(contributed by Alex H)
* Upgrade Woodstox to 6.6.1 (latest at the time)

2.16.3 (not yet released)

#509: Exception when parsing `List`s of mixed content (since 2.13.0)
(reported by Dennis C)
(fix contributed by Christopher R. W)

2.16.2 (09-Mar-2024)

No changes since 2.16.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,9 +881,17 @@ public JsonToken nextToken() throws IOException
}
// 29-Mar-2021, tatu: This seems like an error condition...
// How should we indicate it? As of 2.13, report as unexpected state
/*
throw _constructError(
"Unexpected non-whitespace text ('"+_currText+"' in Array context: should not occur (or should be handled)"
"Unexpected non-whitespace text ('"+_currText+"') in Array context: should not occur (or should be handled)"
);
*/

// [dataformat-xml#509] 2.13 introduced a defect in which an Exception was thrown above, breaking
// parsing of mixed content arrays (https://github.com/FasterXML/jackson-dataformat-xml/issues/509).
// This exception case was removed to enable continued support of that functionality, but more
// robust state handling may be in order.
// See comment https://github.com/FasterXML/jackson-dataformat-xml/pull/604
}

// If not a leaf (or otherwise ignorable), need to transform into property...
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package com.fasterxml.jackson.dataformat.xml.failing;
package com.fasterxml.jackson.dataformat.xml.deser;

import java.util.*;

import org.junit.Test;

import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlText;

Expand All @@ -31,6 +31,8 @@ public void setKey(java.lang.String value) {
}

static class MetaData {
@JacksonXmlElementWrapper(useWrapping = false)
@JacksonXmlProperty(localName = "data")
protected List<Data> data;

public List<Data> getData() {
Expand Down

0 comments on commit d05688e

Please sign in to comment.