[Mono-bugs] [Bug 320445] Xml Serialization/Deserialization of enums not working

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Sep 21 22:57:09 EDT 2008


User avidigal at novell.com added comment

Andreia Gaita <avidigal at novell.com> changed:

           What    |Removed                                         |Added
                 CC|                                                |avidigal at novell.com
         AssignedTo|lluis at novell.com                                |mhabersack at novell.com

--- Comment #2 from Andreia Gaita <avidigal at novell.com>  2008-09-21 20:57:08 MDT ---
The serializer is working fine, and this only fails on web pages (a console app
doesn't show this problem).

What's going on:

When the AspParser is parsing the text inside the script tag and hits the xml
string containing </SystemPriorityLevel>, it initially thinks it is hitting the
</script> end tag, because it identifies the xml text as a valid tag, and
compares the first letter "s" with the end tag it's looking for, in lower case. 

When it hits the second letter, "y", it realizes it's not the end tag and
continues. When it does this, it copies all the characters already processed to
the text buffer, only it does so from the end tag string, and not from the
original text, assuming that since they matched, they're the same. 

In fact, they are not, since their case is different, and so
</SystemPriorityLevel> becomes </systemPriorityLevel>, and when later the
XmlSerializer tries to parse it, it throws due to the wrong case in the end

I must say, nice aim at hitting this one :P

Patch attached

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list