Multiple close() attempts on StreamResult
XsltController.applyTemplates() is prematurely closing the result stream when called from
XsltTransformer.applyTemplates() when output is a
FileOutputStream and output is default XML. This ends with
XMLEmitter.close() being called twice, failing with the second @write.flush()@.
The commented-out logic for
mustClose may need to be revisited
#1 Updated by Michael Kay over 3 years ago
- Project changed from 4 to Saxon
- Description updated (diff)
- Status changed from New to Resolved
- Applies to branch 9.9 added
- Fix Committed on Branch 9.9 added
I believe this issue (which arose during 9.9 development) is now resolved.
I experimentally inserted a RegularSequenceChecker into the pipeline between the XSLT/XQuery engine and the Destination; I also modified the RegularSequenceChecker so that it disallows multiple close() calls. There were no failures from the XSLT3. QT3, s9apiTests, or JAXPTest test runs.
I'm making this change permanent by inserting the RegularSequenceChecker into the pipeline if and only if Java assertions are enabled (-ea on the command line).
Please register to edit this issue