[Mono-bugs] [Bug 707434] XmlSerializer Order attribute check is checking for this on XmlAttribute

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jul 25 15:36:52 EDT 2011



--- Comment #2 from scott fluto <srfcanada at hotmail.com> 2011-07-25 19:36:51 UTC ---
Actually, this would be more clean without effecting the method call:

line 355: 
from: if (IsOrderExplicit == null)
to: if (rmember.XmlAttributes.XmlElements.Count > 0 && isOrderExplicit == null)

Line 357:
from: else if (isOrderExplicit != (rmember.XmlAttributes.Order >= 0))
to: else if (rmember.XmlAttributes.XmlElements.Count > 0 && isOrderExplicit !=
(rmember.XmlAttributes.Order >= 0))

This is just a sample though and should also consider XmlArray and
XmlAnyElements but this still seems a bit flawed and prone to future bugs.

this will fix the problem but I think adding the Order Property to the
XmlAttributes class is incorrect since it can give the impression the Order is
applicable to all Xml Attributes which is actually the reason for this bug
since it was also making this invalid assumption. The Order property should
really should be put in the classes it applicable to.

This really should be a higher priority though since I cant imagine how any
real world XmlSerialization would work given most would have have at least 1
XMlAttribute and XmlElement defined for a class that use the Order Field.

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