jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcel Reutegger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JCR-1996) Handle date values in the far future or prevent these from being persisted
Date Thu, 26 Feb 2009 09:13:01 GMT

     [ https://issues.apache.org/jira/browse/JCR-1996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Marcel Reutegger updated JCR-1996:
----------------------------------

    Attachment: JCR-1996.patch

Updated patch with following changes:

- ISO8601.format(Calendar) now throws an IllegalArgumentException if the Calendar cannot be
formatted according to ISO 8601.
- DateValue constructor does the same
- Exception is caught in PropertyImpl.setValue(Calendar) and a ValueFormatException is thrown
- ValueFactory.createValue(Calendar) now also throws an InvalidArgumentException in case the
calendar cannot be formatted according to ISO 8601.

See also added test case.

> 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, 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.


Mime
View raw message