[
https://issues.apache.org/jira/browse/FILEUPLOAD-251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb resolved FILEUPLOAD-251.
-----------------------------
Resolution: Fixed
Fix Version/s: 1.4
URL: http://svn.apache.org/r1568874
Log:
FILEUPLOAD-251 DiskFileItem#getTempFile() is broken
Modified:
commons/proper/fileupload/trunk/src/changes/changes.xml
commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/disk/DiskFileItem.java
> DiskFileItem#getTempFile() is broken
> ------------------------------------
>
> Key: FILEUPLOAD-251
> URL: https://issues.apache.org/jira/browse/FILEUPLOAD-251
> Project: Commons FileUpload
> Issue Type: Bug
> Affects Versions: 1.3.1
> Reporter: Sebb
> Fix For: 1.4
>
>
> DiskFileItem#getTempFile() looks wrong.
> Presumably the intention of providing the protected method was to allow the
> generation of the path name to be overwritten. This can indeed be done.
> However, if this is done, the tempFile variable will not be set up, so the
> path name won't be cached - unless the overriding method also caches the name.
> The file name needs to agree with the DeferredFileOutputStream that is
> created. This is implied in the Javadoc, but is not currently enforced.
> The protected method needs to implement the name generation part only.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)