You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Michael Glavassevich (Resolved) (JIRA)" <xe...@xml.apache.org> on 2012/02/20 16:17:34 UTC

[jira] [Resolved] (XERCESJ-1556) An incomplete fix for the resource leak bugs in ObjectFactory.java

     [ https://issues.apache.org/jira/browse/XERCESJ-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1556.
-------------------------------------------

    Resolution: Invalid

Again, the condition you are concerned about cannot occur. The BufferedReader (which wraps the InputStreamReader) is always created successfully. There are no circumstances under which it would fail.
                
> An incomplete fix for the resource leak bugs in ObjectFactory.java
> ------------------------------------------------------------------
>
>                 Key: XERCESJ-1556
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1556
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (HTML)
>            Reporter: Guangtai Liang
>            Priority: Critical
>              Labels: incomplete_fix, missing_fixes
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> The fix revision 319937 was aimed to remove an resource leak bug on the BufferedReader object  "rd" in the method "findJarServiceProvider" of the file "/xerces/java/trunk/src/org/apache/html/dom/ObjectFactory.java
> " , but it is incomplete. 
> However, when "rd" is not created successfully but the temp InputStreamReader object created at Line 462 or 464 is created successfully, these temp objects will be leaked. 
> The buggy code locations the same fix needs to be applied at are as bellows: 
> Line  462 and 464 of the method "findJarServiceProvider":
>  
>       try {
> [line 462]            rd = new BufferedReader(new InputStreamReader(is, "UTF-8"), DEFAULT_LINE_LENGTH);
>         } catch (java.io.UnsupportedEncodingException e) {
> [line 464]            rd = new BufferedReader(new InputStreamReader(is), DEFAULT_LINE_LENGTH);
>         }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org