I wouldn't call this a bug, rather unimplemented feature. Anyways, I see no harm in adding support for dates decoding. I just checked in a fix similar to Adrian's patch, but with a bit of refactoring of the surrounding code. Adrian, could you please test it to see that it works for you?

Andrus


On Nov 22, 2006, at 4:08 PM, Adrian Wiesmann (JIRA) wrote:

XMLDecoder decodes Dates wrong
------------------------------

         Key: CAY-710
         URL: http://issues.apache.org/cayenne/browse/CAY-710
     Project: Cayenne
        Type: Bug

  Components: Cayenne Core Library
    Versions: 3.0
    Reporter: Adrian Wiesmann


The XMLDecoder does not interpret Date fields properly. When decoding and creating a new instance of a class Cayenne does this:

return c.newInstance(new Object[] {
XMLUtil.getText(child)
});

But unfortunately the constructor for Date is different and the decoding process crashes because of this. Please see attached patch for a fix.

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



Reply via email to