Issue Details (XML | Word | Printable)

Key: CAY-710
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Adrian Wiesmann
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Cayenne

XMLDecoder decodes Dates wrong

Created: 22/Nov/06 09:07 PM   Updated: 09/Nov/08 01:14 AM
Return to search
Component/s: Cayenne Core Library
Affects Version/s: 3.0
Fix Version/s: 3.0M1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works patch.txt 2006-11-22 09:09 PM Adrian Wiesmann 2 kB

Resolution Date: 22/Nov/06 11:45 PM


 Description  « Hide
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.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Repository Revision Date User Message
ASF #478387 Wed Nov 22 23:45:09 UTC 2006 aadamchik CAY-710: XMLDecoder decodes Dates wrong
(patch similar to the one submitted by Adrian, but refactored the code a bit)
Files Changed
MODIFY /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/xml/XMLDecoder.java