You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Rickard Öberg (JIRA)" <ji...@apache.org> on 2006/12/06 13:31:00 UTC

[jira] Created: (WW-1541) PropertiesSettings does not close properties files properly

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


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

       

[jira] Assigned: (WW-1541) PropertiesSettings does not close properties files properly

Posted by "David H. DeWolf (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1541?page=all ]

David H. DeWolf reassigned WW-1541:
-----------------------------------

    Assignee: David H. DeWolf

> 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
>
> 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

       

[jira] Updated: (WW-1541) PropertiesSettings does not close properties files properly

Posted by "Rainer Hermanns (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/struts/browse/WW-1541?page=all ]

Rainer Hermanns updated WW-1541:
--------------------------------

    Fix Version/s: 2.0.2

> 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

       

[jira] Resolved: (WW-1541) PropertiesSettings does not close properties files properly

Posted by "David H. DeWolf (JIRA)" <ji...@apache.org>.
     [ 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