Return-Path: X-Original-To: apmail-ant-notifications-archive@minotaur.apache.org Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3797497B9 for ; Thu, 23 Feb 2012 07:07:09 +0000 (UTC) Received: (qmail 65882 invoked by uid 500); 23 Feb 2012 07:07:09 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 65785 invoked by uid 500); 23 Feb 2012 07:07:06 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 65750 invoked by uid 99); 23 Feb 2012 07:07:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 07:07:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.115] (HELO eir.zones.apache.org) (140.211.11.115) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 23 Feb 2012 07:06:59 +0000 Received: by eir.zones.apache.org (Postfix, from userid 80) id 5C03D50572; Thu, 23 Feb 2012 07:06:38 +0000 (UTC) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 52740] New: An incomplete fix for the resource leak bug in Javadoc.java Date: Thu, 23 Feb 2012 07:06:36 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Core X-Bugzilla-Keywords: X-Bugzilla-Severity: critical X-Bugzilla-Who: lianggt08@sei.pku.edu.cn X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org 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.