You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2012/02/23 08:06:36 UTC

DO NOT REPLY [Bug 52740] New: An incomplete fix for the resource leak bug in Javadoc.java

https://issues.apache.org/bugzilla/show_bug.cgi?id=52740

             Bug #: 52740
           Summary: An incomplete fix for the resource leak bug in
                    Javadoc.java
           Product: Ant
           Version: unspecified
          Platform: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: lianggt08@sei.pku.edu.cn
    Classification: Unclassified


The fix revision 272583 was aimed to remove resource leak bugs on the
PrintWriter object "srcListWriter" (created in line 1684) in the method
"execute"of the file 
"/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Javadoc.java" , but it
is incomplete.

There are some problems: 
1. when "srcListWriter" isn't created successfully but the temp FileWriter
object is created successfully (at line 1685), the temp FileWriter object will
be leaked. 

The best way to close such resource objects is putting such close operations
for all resource objects in the finaly block of a try-catch-finally structure
and then putting all other code in a try block.

The problem still exists in the head revision (the temp FileWriter object
created at 1723 can be leaked).

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

DO NOT REPLY [Bug 52740] An incomplete fix for the resource leak bug in Javadoc.java

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=52740

Jesse Glick <jg...@netbeans.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
            Version|unspecified                 |1.8.2
           Platform|PC                          |All
                 CC|                            |jglick@netbeans.org
         Resolution|                            |FIXED
   Target Milestone|---                         |1.9.0
           Severity|critical                    |minor
         OS/Version|                            |All

--- Comment #1 from Jesse Glick <jg...@netbeans.org> 2012-02-27 21:43:56 UTC ---
Committed revision 1294345.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.