[Mono-bugs] [Bug 82094][Wis] New - XmlSerializer should ignore Enum values marked with ObsoleteAttribute

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 13 13:14:53 EDT 2007

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by sr at d-90.nl.


--- shadow/82094	2007-07-13 13:14:53.000000000 -0400
+++ shadow/82094.tmp.19165	2007-07-13 13:14:53.000000000 -0400
@@ -0,0 +1,58 @@
+Bug#: 82094
+Product: Mono: Class Libraries
+Version: 1.2
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: Sys.XML
+AssignedTo: atsushi at ximian.com                            
+ReportedBy: sr at d-90.nl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: XmlSerializer should ignore Enum values marked with ObsoleteAttribute
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Microsoft's implementation ignores Enum values marked with [Obsolete] while
+Mono doesn't. This causes inconsistent behavior when accessing data that
+contains the obsoleted values
+Steps to reproduce the problem:
+1. run the attached test program
+Actual Results:
+Program writes "Obsolete element deserialized"
+Expected Results:
+Exception because the obsolete value isn't recognized
+How often does this happen? 
+Additional Information:
+MS' stacktrace:
+Unhandled Exception: System.InvalidOperationException: There is an error in
+the XML document. ---> System.InvalidOperationException: Instance
+validation error: 'barValue' is not a valid value for MyEnum.
+   at
+   at
+isNullable, Boolean checkType)
+   at
+   --- End of inner exception stack trace ---
+   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
+xmlReader, String encodingStyle, XmlDeserializationEvents events)
+   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
+xmlReader, String encodingStyle)
+   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
+   at Test.Main(String[] args)

More information about the mono-bugs mailing list