struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David H. DeWolf (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (WW-1541) PropertiesSettings does not close properties files properly
Date Wed, 06 Dec 2006 12:53:57 GMT
     [ http://issues.apache.org/struts/browse/WW-1541?page=all ]

David H. DeWolf resolved WW-1541.
---------------------------------

    Resolution: Fixed

Done, thanks.

> PropertiesSettings does not close properties files properly
> -----------------------------------------------------------
>
>                 Key: WW-1541
>                 URL: http://issues.apache.org/struts/browse/WW-1541
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>            Reporter: Rickard Öberg
>         Assigned To: David H. DeWolf
>             Fix For: 2.0.2
>
>
> PropertiesSettings does not close the stream to the properties file that is read. This
causes redeploy issues, since the properties file cannot be removed on undeploy. Fix the constructor
code like this:
> InputStream inStream = null;
>         try {
>            inStream = settingsUrl.openStream();
>             settings.load(inStream);
>         } catch (IOException e) {
>             throw new StrutsException("Could not load " + name + ".properties:" + e,
e);
>         } finally
>         {
>            if (inStream != null)
>               try
>               {
>                  inStream.close();
>               } catch (IOException e)
>               {
>                  // Ignore
>               }
>         }

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

       

Mime
View raw message