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 09:40:20 UTC

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

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

             Bug #: 52743
           Summary: An incomplete fix for the resource leak bug in
                    ReplaceRegExp.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 revisions 270637, 272826, and 905179 were aimed to remove resource leak
bugs on the Reader object "r", the Writer object "w", the BufferedWriter object
"bw" in the method "doReplace"of the file
"/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java"
, but it is incomplete.

In the head revision (rev1037691), there is still some problem: 
1. the BufferedReader object "br" created at line 369 isn't closed, and  it
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.

-- 
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 52743] An incomplete fix for the resource leak bug in ReplaceRegExp.java

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

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

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

--- Comment #1 from Jesse Glick <jg...@netbeans.org> 2012-02-28 18:54:39 UTC ---
Committed revision 1294780.

-- 
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 52743] An incomplete fix for the resource leak bug in ReplaceRegExp.java

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

--- Comment #2 from Jesse Glick <jg...@netbeans.org> 2012-03-05 16:51:31 UTC ---
Refined in revision 1297127.

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