Skip to content

Commit ee0645d

Browse files
committed
Fix #250
1 parent f561a4a commit ee0645d

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ public Name(String f, String l) {
2222
static class Names {
2323
public List<Name> names = new ArrayList<Name>();
2424
}
25-
25+
2626
/*
2727
/**********************************************************
28-
/* Unit tests
28+
/* Test methods
2929
/**********************************************************
3030
*/
3131

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.fasterxml.jackson.dataformat.xml.deser;
2+
3+
import java.io.IOException;
4+
5+
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
6+
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
7+
8+
public class ExceptionDeserializationTest extends XmlTestBase
9+
{
10+
/*
11+
/**********************************************************
12+
/* Test methods
13+
/**********************************************************
14+
*/
15+
16+
private final XmlMapper MAPPER = new XmlMapper();
17+
18+
// [dataformat-xml#250]
19+
public void testEmptyString162() throws Exception
20+
{
21+
IOException src = new IOException("test");
22+
String xml = MAPPER.writeValueAsString(src);
23+
IOException e = MAPPER.readValue(xml, IOException.class);
24+
assertNotNull(e);
25+
assertEquals("test", e.getMessage());
26+
}
27+
}

0 commit comments

Comments
 (0)