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

             Bug #: 52731
           Summary: An incomplete fix for the resource leak bug in
                    JDTCompiler.java
           Product: Tomcat 7
           Version: trunk
          Platform: PC
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: liangg...@sei.pku.edu.cn
    Classification: Unclassified


The fix revision 1043157 was aimed to remove an resource leak bug on the
BufferedReader object "reader " (created in line 115), the FileInputStream
object "is" (created in line 112) in the method "getContents()" of the file
"/tomcat/trunk/java/org/apache/jasper/compiler/JDTCompiler.java" , but it is
incomplete. 

There are some problems: 
1. when "reader" is not created successfully but the temp InputStreamReader is
created successfully at line 114, the temp InputStreamReader will be leaked. 


The best way to close such resource objects is putting such close operations in
the finaly block of a try-catch-finally structure.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to