[
https://issues.apache.org/jira/browse/WW-3490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
John Lindal updated WW-3490:
----------------------------
Attachment: patch
Patch for 2.2.1 (and trunk)
> 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
> Priority: Minor
> 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.
-
You can reply to this email to add a comment to the issue online.