-
-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for #460 (actually just verification test, release notes; real fi…
…x in jackson-databind)
- Loading branch information
1 parent
2874ddc
commit 847f707
Showing
4 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/test/java/com/fasterxml/jackson/dataformat/xml/failing/ListDeser458Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package com.fasterxml.jackson.dataformat.xml.failing; | ||
|
||
import java.util.List; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.fasterxml.jackson.dataformat.xml.XmlTestBase; | ||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlElementWrapper; | ||
|
||
public class ListDeser458Test extends XmlTestBase | ||
{ | ||
static class Channel458 { | ||
public String channelId; | ||
} | ||
|
||
static class ChannelSet458 { | ||
public String setId; | ||
|
||
// is default but just for readability | ||
@JacksonXmlElementWrapper(useWrapping = true) | ||
public List<Channel458> channels; | ||
} | ||
|
||
private final ObjectMapper XML_MAPPER = newMapper(); | ||
|
||
public void testIssue458() throws Exception | ||
{ | ||
String input = "<ChannelSet458>\n" + | ||
"<setId>2</setId>\n" + | ||
"<channels>\n" + | ||
"</channels>\n" + | ||
"</ChannelSet458>"; | ||
ChannelSet458 inputProxyChannelStatus = XML_MAPPER.readValue(input, ChannelSet458.class); | ||
assertEquals("List should be empty", 0, | ||
inputProxyChannelStatus.channels.size()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters