jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-14) {XML|Object}PersistenceManager.destroy(*) may fail
Date Wed, 27 Oct 2004 16:45:32 GMT
{XML|Object}PersistenceManager.destroy(*) may fail
--------------------------------------------------

         Key: JCR-14
         URL: http://issues.apache.org/jira/browse/JCR-14
     Project: Jackrabbit
        Type: Bug
 Environment: Jackrabbit SVN rev. 55714
    Reporter: Felix Meschberger


The destroy methods of the ObjectPersistenceManager class try to delete their files without
checking for their existence. This may result in a FileSystemException being thrown because
according to the specification of FileSystem.deleteFile() a FileSystemException is thrown
"if this path does not denote a file or if another error occurs."

While the Jackrabbit LocalFileSystem implementation silently ignores a request to delete a
non-existing file, our internal implementation of the interface throws a FileSystemException
in this case, which cause destroy to fail.

I suggest all destroy methods should be extended to first check for the existence of the file
to prevent from being thrown.

Note: This not only applies to ObjectPersistenceManager but also to XMLPersistenceManager.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message