You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by Brian Eaton <be...@google.com> on 2008/06/12 08:00:57 UTC

why ModulePrefs.toString()?

I just discovered some test cases that appear to indicate that
ModulePrefs.toString() needs to serialize the module prefs as a
well-formed XML document.  Where is this functionality being used?  Is
it important?

Most of the code invoked by ModulePrefs.toString fails to escape XML
metacharacters, so this is prone to breakage.

Re: why ModulePrefs.toString()?

Posted by Kevin Brown <et...@google.com>.
On Wed, Jun 11, 2008 at 11:00 PM, Brian Eaton <be...@google.com> wrote:

> I just discovered some test cases that appear to indicate that
> ModulePrefs.toString() needs to serialize the module prefs as a
> well-formed XML document.  Where is this functionality being used?  Is
> it important?


Only for debugging. I added the toStringIsSane tests to ensure that anyone
modifying the specs include them in toString operations.


> Most of the code invoked by ModulePrefs.toString fails to escape XML
> metacharacters, so this is prone to breakage.


Yes --  it's not intended as a serialization mechanism, though if we do
decide to make GadgetSpec serializable, we certainly could support this.