Skip to content

Commit 6cee20d

Browse files
committed
minor test cleanup
1 parent d9491c4 commit 6cee20d

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/ser/XmlBeanSerializerBase.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,8 @@ public XmlBeanSerializerBase(BeanSerializerBase src)
6363
{
6464
super(src);
6565

66-
/* Then make sure attributes are sorted before elements, keep track
67-
* of how many there are altogether
68-
*/
66+
// Then make sure attributes are sorted before elements, keep track
67+
// of how many there are altogether
6968
int attrCount = 0;
7069
for (BeanPropertyWriter bpw : _props) {
7170
if (_isAttribute(bpw)) { // Yup: let's build re-ordered list then

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ static class Bean {
1919
static class Container {
2020
@JacksonXmlProperty(isAttribute = true)
2121
public String start = "!start";
22-
23-
@JacksonXmlProperty(isAttribute = true)
24-
public String end = "!end";
2522

2623
@JacksonXmlProperty(isAttribute = true)
2724
protected Bean bean = new Bean();
25+
26+
@JacksonXmlProperty(isAttribute = true)
27+
public String end = "!end";
2828
}
2929

3030
/*
@@ -37,7 +37,9 @@ static class Container {
3737

3838
public void testAttributeDeser128() throws Exception
3939
{
40+
final String output = MAPPER.writeValueAsString(new Container()).trim();
41+
//System.err.println(output);
4042
assertEquals("<root start=\"!start\" end=\"!end\"><bean><value>42</value></bean></root>",
41-
MAPPER.writeValueAsString(new Container()).trim());
43+
output);
4244
}
4345
}

0 commit comments

Comments
 (0)