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

PatternSet leaves BufferedReader open, can cause problems if GC isn't allowed 
to close it in time

           Summary: PatternSet leaves BufferedReader open, can cause
                    problems if GC isn't allowed to close it in time
           Product: Ant
           Version: 1.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I have a task which generates a temporary includesFile for a JAR task.  After
creating the JAR it immediately deletes the temporary includesFile.  This will
fail intermittently because the garbage collector has not gotten around to
closing the dereferenced file handle opened in the PatternSet used to process
the includesFile parameter.

Adding this line near the end of the readPatterns(...) in PatternSet.java method
resolves the issue 100% of the time.

            patternReader.close();

Thanks!

Reply via email to