You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Peter Dettman (JIRA)" <ji...@apache.org> on 2010/07/15 19:32:51 UTC
[jira] Created: (JCR-2676) FileDataStore should check for
lastModified error result
FileDataStore should check for lastModified error result
--------------------------------------------------------
Key: JCR-2676
URL: https://issues.apache.org/jira/browse/JCR-2676
Project: Jackrabbit Content Repository
Issue Type: Improvement
Components: jackrabbit-core
Affects Versions: 2.1.0
Reporter: Peter Dettman
According to javadoc for File.lastModified(), the return value may indicate error: "...or 0L if the file does not exist or if an I/O error occurs".
Accordingly, FileDataStore should be checking for this return value, rather than treating it as an actual modification time of "0".
Patch to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (JCR-2676) FileDataStore should check for
lastModified error result
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller reassigned JCR-2676:
-----------------------------------
Assignee: Thomas Mueller
> FileDataStore should check for lastModified error result
> --------------------------------------------------------
>
> Key: JCR-2676
> URL: https://issues.apache.org/jira/browse/JCR-2676
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Affects Versions: 2.1.0
> Reporter: Peter Dettman
> Assignee: Thomas Mueller
> Attachments: JCR-2676.patch
>
>
> According to javadoc for File.lastModified(), the return value may indicate error: "...or 0L if the file does not exist or if an I/O error occurs".
> Accordingly, FileDataStore should be checking for this return value, rather than treating it as an actual modification time of "0".
> Patch to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-2676) FileDataStore should check for
lastModified error result
Posted by "Peter Dettman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter Dettman updated JCR-2676:
-------------------------------
Attachment: JCR-2676.patch
Patch of FileDataStore to check for lastModified return code of "0", indicating error.
- in addRecord and getRecordIfStored, it's an error if lastModified fails, since we can't tell whether to call setLastModified or not.
- in deleteOlderRecursive, we just log a warning, and make sure not to delete the file!
Also added a warning if the call to File.delete fails in deleteOlderRecursive
> FileDataStore should check for lastModified error result
> --------------------------------------------------------
>
> Key: JCR-2676
> URL: https://issues.apache.org/jira/browse/JCR-2676
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Affects Versions: 2.1.0
> Reporter: Peter Dettman
> Attachments: JCR-2676.patch
>
>
> According to javadoc for File.lastModified(), the return value may indicate error: "...or 0L if the file does not exist or if an I/O error occurs".
> Accordingly, FileDataStore should be checking for this return value, rather than treating it as an actual modification time of "0".
> Patch to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-2676) FileDataStore should check for
lastModified error result
Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-2676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Mueller resolved JCR-2676.
---------------------------------
Resolution: Fixed
Thanks for the patch! I have committed it in the trunk.
> FileDataStore should check for lastModified error result
> --------------------------------------------------------
>
> Key: JCR-2676
> URL: https://issues.apache.org/jira/browse/JCR-2676
> Project: Jackrabbit Content Repository
> Issue Type: Improvement
> Components: jackrabbit-core
> Affects Versions: 2.1.0
> Reporter: Peter Dettman
> Assignee: Thomas Mueller
> Attachments: JCR-2676.patch
>
>
> According to javadoc for File.lastModified(), the return value may indicate error: "...or 0L if the file does not exist or if an I/O error occurs".
> Accordingly, FileDataStore should be checking for this return value, rather than treating it as an actual modification time of "0".
> Patch to follow.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.