Project

Profile

Help

Bug #3754

closed

Multiple close() attempts on StreamResult

Added by John Lumley over 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2018-04-20
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.9
Fix Committed on Branch:
9.9
Fixed in Maintenance Release:
Platforms:

Description

+9.9 trunk+

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

Actions #1

Updated by Michael Kay almost 4 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).

Actions #2

Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.9.0.2 added

Bug fix applied to the Saxon 9.9.0.2 maintenance release.

Please register to edit this issue

Also available in: Atom PDF