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 14:35:15 UTC

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

Marcel Reutegger created OAK-749:
------------------------------------

             Summary: 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
            Priority: Minor


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