Author: atsushi
Date: 2008-01-23 22:55:40 -0500 (Wed, 23 Jan 2008)
New Revision: 93763

Modified:
   trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
   trunk/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs
   trunk/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapElementInfo.cs
Log:
2008-01-24  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * TypeData.cs : fixed setter which did not actually see the argument.
        * XmlTypeMapElementInfo.cs : some cosmetic fixes for gendarme-
          reported issues.



Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog       
2008-01-24 03:52:05 UTC (rev 93762)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog       
2008-01-24 03:55:40 UTC (rev 93763)
@@ -1,3 +1,9 @@
+2008-01-24  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * TypeData.cs : fixed setter which did not actually see the argument.
+       * XmlTypeMapElementInfo.cs : some cosmetic fixes for gendarme-
+         reported issues.
+
 2007-11-09  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * XmlTypeMapping.cs : to get schema provider method, check base

Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs     
2008-01-24 03:52:05 UTC (rev 93762)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/TypeData.cs     
2008-01-24 03:55:40 UTC (rev 93763)
@@ -247,7 +247,7 @@
 
                        set
                        {
-                               nullableOverride = true;
+                               nullableOverride = value;
                        }
                }
 

Modified: 
trunk/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapElementInfo.cs
===================================================================
--- 
trunk/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapElementInfo.cs    
    2008-01-24 03:52:05 UTC (rev 93762)
+++ 
trunk/mcs/class/System.XML/System.Xml.Serialization/XmlTypeMapElementInfo.cs    
    2008-01-24 03:55:40 UTC (rev 93763)
@@ -153,17 +153,27 @@
                public bool IsTextElement
                {
                        get { return ElementName == "<text>"; }
-                       set { ElementName = "<text>"; Namespace = string.Empty; 
}
+                       set {
+                               if (!value)
+                                       throw new Exception ("INTERNAL ERROR; 
someone wrote unexpected code in sys.xml");
+                               ElementName = "<text>"; Namespace = 
string.Empty;
+                       }
                }
 
                public bool IsUnnamedAnyElement
                {
                        get { return ElementName == string.Empty; }
-                       set { ElementName = string.Empty; Namespace = 
string.Empty; }
+                       set {
+                               if (!value)
+                                       throw new Exception ("INTERNAL ERROR; 
someone wrote unexpected code in sys.xml");
+                               ElementName = string.Empty; Namespace = 
string.Empty;
+                       }
                }
 
                public override bool Equals (object other)
                {
+                       if (other == null)
+                               return false;
                        XmlTypeMapElementInfo oinfo = 
(XmlTypeMapElementInfo)other;
                        if (_elementName != oinfo._elementName) return false;
                        if (_type.XmlType != oinfo._type.XmlType) return false;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to