You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "John Sisson (JIRA)" <de...@geronimo.apache.org> on 2006/06/09 07:35:29 UTC

[jira] Created: (GERONIMO-2096) PluginInstallerGBean.updatePluginMetadata(..) may leave geronimo-plugin.xml file open

PluginInstallerGBean.updatePluginMetadata(..) may leave geronimo-plugin.xml file open
-------------------------------------------------------------------------------------

         Key: GERONIMO-2096
         URL: http://issues.apache.org/jira/browse/GERONIMO-2096
     Project: Geronimo
        Type: Bug
    Security: public (Regular issues) 
  Components: core, Plugins  
    Versions: 1.1    
    Reporter: John Sisson
     Fix For: 1.1


The code contains the following statement, where the xml variable is a File.

xform.transform(new DOMSource(doc), new StreamResult(xml));

We have experienced in another issue ( GERONIMO-2095 ) that this does not close the FileOutputStream that gets created automatically on your behalf.

It is safer to create your own FileOutputStream and pass it on the StreamResult constructor and ensure it is closed in a finally block.  See fix for GERONIMO-2095 for an example.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Assigned: (GERONIMO-2096) PluginInstallerGBean.updatePluginMetadata(..) may leave geronimo-plugin.xml file open

Posted by "John Sisson (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-2096?page=all ]

John Sisson reassigned GERONIMO-2096:
-------------------------------------

    Assign To: John Sisson

> PluginInstallerGBean.updatePluginMetadata(..) may leave geronimo-plugin.xml file open
> -------------------------------------------------------------------------------------
>
>          Key: GERONIMO-2096
>          URL: http://issues.apache.org/jira/browse/GERONIMO-2096
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: core, Plugins
>     Versions: 1.1
>     Reporter: John Sisson
>     Assignee: John Sisson
>      Fix For: 1.1

>
> The code contains the following statement, where the xml variable is a File.
> xform.transform(new DOMSource(doc), new StreamResult(xml));
> We have experienced in another issue ( GERONIMO-2095 ) that this does not close the FileOutputStream that gets created automatically on your behalf.
> It is safer to create your own FileOutputStream and pass it on the StreamResult constructor and ensure it is closed in a finally block.  See fix for GERONIMO-2095 for an example.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (GERONIMO-2096) PluginInstallerGBean.updatePluginMetadata(..) may leave geronimo-plugin.xml file open

Posted by "John Sisson (JIRA)" <de...@geronimo.apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-2096?page=all ]
     
John Sisson closed GERONIMO-2096:
---------------------------------

    Resolution: Fixed

Fixed.

> PluginInstallerGBean.updatePluginMetadata(..) may leave geronimo-plugin.xml file open
> -------------------------------------------------------------------------------------
>
>          Key: GERONIMO-2096
>          URL: http://issues.apache.org/jira/browse/GERONIMO-2096
>      Project: Geronimo
>         Type: Bug
>     Security: public(Regular issues) 
>   Components: core, Plugins
>     Versions: 1.1
>     Reporter: John Sisson
>     Assignee: John Sisson
>      Fix For: 1.1

>
> The code contains the following statement, where the xml variable is a File.
> xform.transform(new DOMSource(doc), new StreamResult(xml));
> We have experienced in another issue ( GERONIMO-2095 ) that this does not close the FileOutputStream that gets created automatically on your behalf.
> It is safer to create your own FileOutputStream and pass it on the StreamResult constructor and ensure it is closed in a finally block.  See fix for GERONIMO-2095 for an example.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira