You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/03/04 18:45:57 UTC

DO NOT REPLY [Bug 6852] New: - The JUnitReport task leaves the output stream open when finished.

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=6852>.
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=6852

The JUnitReport task leaves the output stream open when finished.

           Summary: The JUnitReport task leaves the output stream open when
                    finished.
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Optional Tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: jon@strayer.net


Neither Xalan1Executor.execute nor Xalan2Executor.execute close the output 
stream before returning.  If the VM doesn't exit at the end of the build (for 
example when Ant is running in an IDE) then the file is left open (and 
undeleteable - that's the problem I noticed).

Adding os.close() to the end of each method takes care of the problem.

To reproduce the bug you have to run Ant from within an IDE.  You also need a 
junitreport task that depends on a "clean" task that deletes the output of 
junitreport.  Then just run the junitreport task twice without exiting the 
IDE.  The clean task will fail on the second run.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>