Skip to content

Commit 6d5cf78

Browse files
committed
Fixed #25 (or actually added release notes, fix itself due to defaults change of #411)
1 parent 82dfb24 commit 6d5cf78

File tree

2 files changed

+19
-27
lines changed

2 files changed

+19
-27
lines changed

src/test/java/com/fasterxml/jackson/dataformat/xml/deser/EmptyStringValueTest.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
77
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
8+
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
89

910
public class EmptyStringValueTest extends XmlTestBase
1011
{
@@ -23,6 +24,14 @@ static class Names {
2324
public List<Name> names = new ArrayList<Name>();
2425
}
2526

27+
// [dataformat-xml#25]
28+
static class EmptyStrings25
29+
{
30+
@JacksonXmlProperty(isAttribute=true)
31+
public String a = "NOT SET";
32+
public String b = "NOT SET";
33+
}
34+
2635
/*
2736
/**********************************************************
2837
/* Test methods
@@ -70,4 +79,14 @@ public void testEmptyStringElement() throws Exception
7079
assertEquals("", bean.text);
7180
// assertNull(bean.text);
7281
}
82+
83+
// [dataformat-xml#25]
84+
public void testEmptyStringFromElemAndAttr() throws Exception
85+
{
86+
EmptyStrings25 ob = MAPPER.readValue("<EmptyString a=''><b /></EmptyString>",
87+
EmptyStrings25.class);
88+
assertNotNull(ob);
89+
assertEquals("", ob.a);
90+
assertEquals("", ob.b);
91+
}
7392
}

src/test/java/com/fasterxml/jackson/dataformat/xml/failing/Deserialization25Test.java

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)