You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Adrian Wiesmann <aw...@somap.org> on 2006/11/20 23:34:45 UTC
Date and XMLDecoder
Hello all
I am not sure if I found a bug in the XMLDecoder class. I am trying to
decode an Object with a Date field. All the other fields work as expected
until the XMLDecoder reads the Date field and tries to instanciate a new
object of that type.
I am using JDK 1.5 and I guess that the constructor for Date can not be a
string anymore. I found a notice on the Sun website which states that this
constructor (Date(String)) is "Deprecated. As of JDK version 1.1, replaced
by DateFormat.parse(String s)".
I am talking about line 248-250 of XMLDecoder of a Cayenne 3 Snapshot:
return c.newInstance(new Object[] {
XMLUtil.getText(child)
});
Can anyone confirm that the XMLDecoder has a problem with Date types?
Regards,
Adrian