Date and XMLDecoder

From: Adrian Wiesmann (awiesman..omap.org)
Date: Mon Nov 20 2006 - 17:34:45 EST

  • Next message: Tore Halset: "jdbc autoCommit"

    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



    This archive was generated by hypermail 2.0.0 : Mon Nov 20 2006 - 17:35:18 EST