RE: ObjectStore help ...

From: Gentry, Michael \(Contractor\) ("Gentry,)
Date: Wed May 25 2005 - 14:59:37 EDT

  • Next message: Gentry, Michael \(Contractor\): "RE: ObjectStore help ..."

    Shouldn't "newValue == oldValue" check for equality (same object), but
    "newValue.equals(oldValue)" check for equivalance? I should probably
    learn more Java ... :-)

    -----Original Message-----
    From: Cris Daniluk [mailto:cris.danilu..mail.com]
    Sent: Wednesday, May 25, 2005 2:38 PM
    To: cayenne-deve..bjectstyle.org
    Subject: Re: ObjectStore help ...

    > oldValue (byte[]) [0, 0, 0, 0, 0, 0, 0, 34, 89, 45, -9,
    74]newValue
    > (byte[]) [0, 0, 0, 0, 0, 0, 0, 34, 89, 45, -9,
    74]oldValue.equals(newValue)
    > (boolean) false newValue.equals(oldValue) (boolean) false
    >
    > They look equal to me, but equals() doesn't seem to agree (and
    > Util.nullSafeEquals() uses equals()). Anyone have any ideas why this
    might
    > happen?
    >

    Looks like they're equivalent, but not necessarily equal. Possibly
    some sort of serialization issue, like a readResolve() that isn't
    working?



    This archive was generated by hypermail 2.0.0 : Wed May 25 2005 - 14:59:42 EDT