|
|
|
Thanks, this increases my convenience greatly as I no longer have to maintain a separate branch (although my svk mirror will be sticking around a while until I wrap up.... never know when you'll need to patch again)
It threw me to start with, but once you wrap the SaxWriter in an instance of org.xml.sax.helpers.XMLFilterImpl you're good to go again. The code doesn't ever use the custom SaxWriter instance that you pass in ; filterChain will never be an instance of SaxWriter because you can't pass a SaxWriter through to the method because of the API restrictions (which allow SaxWriter to enter but throw an exception because it's not an XMLFilter.
Patch below fixes it. Index: java/com/thoughtworks/xstream/io/xml/TraxSource.java =================================================================== --- java/com/thoughtworks/xstream/io/xml/TraxSource.java (revision 3) +++ java/com/thoughtworks/xstream/io/xml/TraxSource.java (revision 4) @@ -265,7 +265,7 @@ while (filter.getParent() instanceof XMLFilter) { filter = (XMLFilter)(filter.getParent()); } - if (!(filterChain instanceof SaxWriter)) { + if (!(filter.getParent() instanceof SaxWriter)) { filter.setParent(new SaxWriter()); } Hi Adrian,
thanks a lot, I've applied your patch. Regards, Jörg |
||||||||||||||||||||||||||||||||||||||||||||||||
You may give the current SNAPSHOT a try.
Thanks!