Issue Details (XML | Word | Printable)

Key: XSTR-301
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Assignee: Unassigned
Reporter: Michael Hackett
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XStream

Element not closed correctly after an empty element, in Dom4JWriter

Created: 20/Apr/06 03:29 PM   Updated: 31/Jul/06 05:29 PM
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

File Attachments: 1. File fix-patch (0.7 kB)
2. File test-patch (3 kB)



 Description  « Hide
After an empty element, a call to endNode() generates an empty element instead of a closing tag, when using the Dom4JWriter. (Others seem OK.) The endNode() method is not restoring the correct state for Dom4JWriter's internal flags after popping an element off its element stack.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Michael Hackett added a comment - 20/Apr/06 03:29 PM
This is the fix.

Michael Hackett added a comment - 20/Apr/06 03:34 PM
I should have included a comment about the test case patch code. I chose to add the test that demostrates the bug to AbstractXMLWriterTest in case it affected other writer classes, but then I had to make specialized versions for some of the writers, to make the test pass for them. You may prefer to move the single test from AbstactXMLWriterTest to Dom4JWriterTest and ignore the others, since the issue only came up with the one writer.

Joerg Schaible added a comment - 20/Apr/06 04:44 PM
Applied. Thanks for spotting this.

Guilherme Silveira added a comment - 31/Jul/06 05:22 PM
moving to 1.2