You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/10/22 18:51:52 UTC

DO NOT REPLY [Bug 24013] New: - pipeDocument extension element does not close output file

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24013>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24013

pipeDocument extension element does not close output file

           Summary: pipeDocument extension element does not close output
                    file
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.lib
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: pierre.chardin@axa.com


The pipeDocument does not close the transformation output file.

The bug is in method rg.apache.xalan.lib.PipeDocument.usePipe.

The following code:

serializer.setOutputStream(new FileOutputStream(target));
tHLast.setResult(new SAXResult(serializer.asContentHandler()));
reader.parse(source);


should be changed to:

FileOutputStream out = new FileOutputStream(target);
serializer.setOutputStream(out);
tHLast.setResult(new SAXResult(serializer.asContentHandler()));
reader.parse(source);
out.close();