jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Moved: (JCR-864) Bug in org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.UtilDateTypeConverterImpl
Date Wed, 25 Apr 2007 08:57:16 GMT

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

Jukka Zitting moved GRFT-72 to JCR-864:
---------------------------------------

    Component/s:     (was: JCR-Mapping)
                 jcr-mapping
       Assignee:     (was: Christophe Lombart)
            Key: JCR-864  (was: GRFT-72)
        Project: Jackrabbit  (was: Graffito)

> Bug in org.apache.portals.graffito.jcr.persistence.atomictypeconverter.impl.UtilDateTypeConverterImpl
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-864
>                 URL: https://issues.apache.org/jira/browse/JCR-864
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jcr-mapping
>            Reporter: Martin Koci
>         Attachments: UtilDateTypeConverterImpl.patch
>
>
> In this converter following line is used:
> return this.getValueFactory().createValue(((java.util.Date) propValue).getTime());
> but propValue must be converted to java.util.Calendar, not into long! ValueFactory than
converts to LongValue not DateValue as expected.
> Following code works OK:
> final long timeInMilis = ((java.util.Date) propValue).getTime();
> final Calendar calendar = Calendar.getInstance();
> calendar.setTimeInMillis(timeInMilis);
> return this.getValueFactory().createValue( calendar );
> but I dont know better Date-> Calendar conversion.

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