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:37:17 UTC
[jira] [Commented] (OAK-749) Date PropertyState may cause
ClassCastException
[ https://issues.apache.org/jira/browse/OAK-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622097#comment-13622097 ]
Marcel Reutegger commented on OAK-749:
--------------------------------------
Added test case in revision 1464502.
> 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
>
> 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