Date type properties: Content.setNodeData() expects Calendar object, while 
Content2Bean passes Date object
----------------------------------------------------------------------------------------------------------

                 Key: MAGNOLIA-3483
                 URL: http://jira.magnolia-cms.com/browse/MAGNOLIA-3483
             Project: Magnolia
          Issue Type: Bug
          Components: content2bean, core
    Affects Versions: 4.3.8
            Reporter: Felix Rabe
            Assignee: Boris Kraft
             Fix For: 5.0


*Observation:*  While working on REG-91, I used 
{{info.magnolia.cms.core.Content.setNodeData(String, Calendar)}} to set the 
value of a {{type="Date"}} JCR property.  Later, I just assumed Content2Bean 
likewise to pass a {{Calendar}} object to my bean setter methods - see the 
state of AuthenticationTokenConfig.java in commit r40983.  This did not work, 
and it turns out that the Content2Bean mechanism actually passes a {{Date}} 
object for {{type="Date"}} JCR properties.  (I found out by changing the 
parameter of the setter method from {{Calendar}} to {{Object}} and stepping 
into the method in debugging mode.)

*Problem:*  Representing the same JCR data using two different Java types just 
feels plain wrong.

*Proposed solution:*  Use the same (sane) Java type for the JCR API and for the 
Content2Bean mechanism in Magnolia 5.0.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to