Skip to content

Commit 8aa276b

Browse files
committed
Fix #282
1 parent ce61138 commit 8aa276b

File tree

4 files changed

+6
-43
lines changed

4 files changed

+6
-43
lines changed

src/main/java/com/fasterxml/jackson/dataformat/xml/XmlMapper.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,10 @@ public void writeValue(XMLStreamWriter w0, Object value) throws IOException {
235235
@SuppressWarnings("resource")
236236
ToXmlGenerator g = getFactory().createGenerator(w0);
237237
super.writeValue(g, value);
238-
/* NOTE: above call should do flush(); and we should NOT close here.
239-
* Finally, 'g' has no buffers to release.
240-
*/
238+
// NOTE: above call should do flush(); and we should NOT close here.
239+
// Finally, 'g' has no buffers to release.
241240
}
242-
241+
243242
/*
244243
/**********************************************************
245244
/* Overridden methods

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ public XmlSerializerProvider(XmlSerializerProvider src,
5454
*/
5555
protected XmlSerializerProvider(XmlSerializerProvider src) {
5656
super(src);
57-
_rootNameLookup = src._rootNameLookup;
57+
// 21-May-2018, tatu: As per [dataformat-xml#282], should NOT really copy
58+
// root name lookup as that may link back to diff version, configuration
59+
_rootNameLookup = new XmlRootNameLookup();
5860
}
5961

6062
/*

src/test/java/com/fasterxml/jackson/dataformat/xml/MapperCopyTest.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public void testMapperSerialization() throws Exception
7070
assertEquals("foo", mapper2.getFactory().getXMLTextElementName());
7171
}
7272

73-
/*
7473
// [dataformat-xml#282]
7574
public void testCopyWith() throws Exception
7675
{
@@ -90,5 +89,4 @@ public void testCopyWith() throws Exception
9089
fail("Should NOT use name 'AnnotatedName' but 'Pojo282', xml = "+xml1);
9190
}
9291
}
93-
*/
9492
}

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

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

0 commit comments

Comments
 (0)