You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ace.apache.org by "J.W. Janssen (Commented) (JIRA)" <ji...@apache.org> on 2012/03/22 14:40:22 UTC

[jira] [Commented] (ACE-155) Review all file renames and check if they can cause a move across volumes

    [ https://issues.apache.org/jira/browse/ACE-155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13235575#comment-13235575 ] 

J.W. Janssen commented on ACE-155:
----------------------------------

Did a grep on the source tree of today (March, 22nd 2012, 14:00h), and got the following results:

* ace-configurator/src/test/java/org/apache/ace/configurator/ConfiguratorTest.java:    outFile.renameTo(dest);
* ace-configurator/src/test/java/org/apache/ace/configurator/ConfiguratorTest.java:    outFile.renameTo(dest);

* ace-deployment-verifier/src/main/java/org/apache/felix/framework/util/SecureAction.java:    return oldFile.renameTo(newFile);
* ace-deployment-verifier/src/main/java/org/apache/felix/framework/util/SecureAction.java:    return ((File) arg1).renameTo((File) arg2) ? Boolean.TRUE : Boolean.FALSE;

* ace-obr-metadata/src/main/java/org/apache/ace/obr/metadata/bindex/BIndexMetadataGenerator.java:                    renameOK = tempIndex.renameTo(index);

* ace-repository-impl/src/main/java/org/apache/ace/repository/impl/RepositoryImpl.java:        if (!tempFile.renameTo(file)) {

All of these locations can potentially fail, as all of them use temporary files in some way. A solution would be to use the "moveFile" method found in Commons-IO.

                
> Review all file renames and check if they can cause a move across volumes
> -------------------------------------------------------------------------
>
>                 Key: ACE-155
>                 URL: https://issues.apache.org/jira/browse/ACE-155
>             Project: ACE
>          Issue Type: Task
>            Reporter: Marcel Offermans
>
> See ACE-154, if we do a cross volume rename to move a file, it will fail. Review the rest of the codebase to ensure we're handling this correctly across the board.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira