On Wed, 2007-01-03 at 12:11 -0800, Turadg Aleahmad wrote:
On 1/3/07, Scott Cytacki <[EMAIL PROTECTED]> wrote:
> I now remember something I emailed about before that probably explains
> it.  When XmlEncoder compares two object properties to see if it needs
> to write out the property, by default it doesn't use the equals method
> to see if they are the same.  By default it just checks if the classes
> are the same.  The easy way around this is to make sure the default
> value of the property "null".  The better way around this is to install
> handler that uses the equals method for URLs, instead of using the
> default Object handler.

You mean that if the default value of property "foreground" is
java.awt.Color.BLACK and I set foreground to java.awt.Color.WHITE,
XmlEncoder will not write it out because they're both class
java.awt.Color?
Yes that is correct, if Color doesn't have the special serialize that
you describe below.


Oh... I think I remember.  It can have a special serializer for each
property type.  So there is a java.awt.Color serializer that's smarter
than that, but there is not one for java.net.URL?
I would expect there to be one, but perhaps not.  The other time when
this happened was a class I expected to work correctly and it didn't.
Unfortunately I didn't record what that class was, or the code location
where the relevant parts were.

Scott


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SAIL-Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/SAIL-Dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to