You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "John Lindal (JIRA)" <ji...@apache.org> on 2011/01/31 21:47:32 UTC

[jira] Resolved: (WW-3490) FileUploadInterceptor should clean up even if action throws exception

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

John Lindal resolved WW-3490.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.2

> FileUploadInterceptor should clean up even if action throws exception
> ---------------------------------------------------------------------
>
>                 Key: WW-3490
>                 URL: https://issues.apache.org/jira/browse/WW-3490
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.2.1
>         Environment: Independent of environment
>            Reporter: John Lindal
>            Assignee: John Lindal
>            Priority: Minor
>             Fix For: 2.2.2
>
>         Attachments: patch
>
>
> In Struts 2.2.1 (and also in trunk), org.apache.struts2.interceptor.FileUploadInterceptor cleans up uploaded files after the action finishes.  The first problem is that the action might throw an exception.  FileUploadInterceptor does not use try...finally, so any action exception will result in files not being cleaned up.  The second problem is that something earlier in the interceptor stack might throw an exception, in which case FileUploadInterceptor will not even be invoked.  The correct solution is for FilterDispatcher to clean up the uploaded files.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira