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?

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 wonder if java.net.URI has the same problem.  I suppose we should be
using that as the property type anyway.

-t

--~--~---------~--~----~------------~-------~--~----~
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