You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Marcel Reutegger (JIRA)" <ji...@apache.org> on 2013/04/04 16:53:15 UTC

[jira] [Resolved] (OAK-749) Date PropertyState may cause ClassCastException

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

Marcel Reutegger resolved OAK-749.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.7

Discussed offline with Michael and we decided to go with the first option.

Fixed in revision 1464579.
                
> Date PropertyState may cause ClassCastException
> -----------------------------------------------
>
>                 Key: OAK-749
>                 URL: https://issues.apache.org/jira/browse/OAK-749
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 0.6
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Minor
>             Fix For: 0.7
>
>
> There's some strange type conversion going on with Date type PropertyStates. The following code fragment will throw a ClassCastException:
> {code}
> String expected = ISO8601.format(Calendar.getInstance());
> PropertyState dateProperty = PropertyStates.createProperty(
>         "date", expected, Type.DATE);
> String actual = dateProperty.getValue(Type.DATE); // <- ClassCastException
> assertEquals(expected, actual);
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira