You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2009/02/25 10:05:02 UTC
[jira] Commented: (JCR-1996) Handle date values in the far future
or prevent these from being persisted
[ https://issues.apache.org/jira/browse/JCR-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12676564#action_12676564 ]
Marcel Reutegger commented on JCR-1996:
---------------------------------------
Ah right, I remember the limits on the value range for dates. The DateField class is a copy of the Lucene DateField, but with a slightly larger value range. In Jackrabbit the range is from 30 BC to 3189.
I suggest we ignore values outside of the supported date range and log a warning. As a workaround one may use a long property where the full value range is supported.
> Handle date values in the far future or prevent these from being persisted
> --------------------------------------------------------------------------
>
> Key: JCR-1996
> URL: https://issues.apache.org/jira/browse/JCR-1996
> Project: Jackrabbit Content Repository
> Issue Type: Bug
> Components: indexing, jackrabbit-core
> Affects Versions: 1.5.3
> Reporter: Martijn Hendriks
> Attachments: JCR-1996.patch
>
>
> Setting a date property with a value in the far future (e.g., the year 20009) and saving the session causes the index component to throw an exception (see the DateField#timeToString method). Furthermore, when the repository is restarted, the properties' value cannot be retrieved anymore because of a ValueFormatException caused by an empty value. Restarting the repository with an empty search index does not work because indexing fails. I haven't looked into the effect on queries.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.