commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary D. Gregory (JIRA)" <>
Subject [jira] [Resolved] (VFS-258) [SFTP][RAM] Unsafe casting to AbstractFileObject subclasses in doRename().
Date Wed, 16 May 2012 15:07:03 GMT


Gary D. Gregory resolved VFS-258.

    Resolution: Fixed

Committed revision 1339211.
> [SFTP][RAM] Unsafe casting to AbstractFileObject subclasses in doRename().
> --------------------------------------------------------------------------
>                 Key: VFS-258
>                 URL:
>             Project: Commons VFS
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Marek Zawirski
>             Fix For: 2.1
>         Attachments: doRename_use_AbstractFileObject.patch
> AbstractFileObject#doRename() method is called from AbstractFileObject#moveTo() when
file can be moved within the same file system. As it concerns file that is subclass AbstractFileObject,
target file is also assumed to be AbstractFileObject type. However, this target file can be
decorated. Undressing with FileObjectUtils.getAbstractFileObject() was not performed in every
places that it should be. Some subclasses do correct stripping of decorator in doRename()
implementations (e.g. FtpFileObject), some of them not (e.g. RamFileObject) - which may cause
> Patch proposal: pass undressed AbstractFileObject to doRename() instead of possibly decorated

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message