Author: lluis
Date: 2005-03-04 13:13:03 -0500 (Fri, 04 Mar 2005)
New Revision: 41458
Modified:
trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
trunk/mcs/class/System.XML/System.Xml.Serialization/ReflectionHelper.cs
trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSchemas.cs
Log:
2005-03-04 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* ReflectionHelper.cs: Avoid endless loop.
* XmlSchemas.cs: Added null check. Patches from MainSoft.
Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
2005-03-04 18:10:29 UTC (rev 41457)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/ChangeLog
2005-03-04 18:13:03 UTC (rev 41458)
@@ -1,3 +1,8 @@
+2005-03-04 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * ReflectionHelper.cs: Avoid endless loop.
+ * XmlSchemas.cs: Added null check. Patches from MainSoft.
+
2005-02-07 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* XmlSerializationReader.cs: After reading an href element, skip the
Modified:
trunk/mcs/class/System.XML/System.Xml.Serialization/ReflectionHelper.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/ReflectionHelper.cs
2005-03-04 18:10:29 UTC (rev 41457)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/ReflectionHelper.cs
2005-03-04 18:13:03 UTC (rev 41458)
@@ -82,12 +82,14 @@
throw new InvalidOperationException
(type.FullName + " cannot be serialized because it is an interface");
Type t = type;
+ Type oldt = null;
do {
if (!t.IsPublic && !t.IsNestedPublic)
throw new InvalidOperationException
(type.FullName + " is inaccessible due to its protection level. Only public
types can be processed");
+ oldt = t;
t = t.DeclaringType;
}
- while (t != null);
+ while (t != null && t != oldt);
}
public static string BuildMapKey (Type type)
Modified: trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSchemas.cs
===================================================================
--- trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSchemas.cs
2005-03-04 18:10:29 UTC (rev 41457)
+++ trunk/mcs/class/System.XML/System.Xml.Serialization/XmlSchemas.cs
2005-03-04 18:13:03 UTC (rev 41458)
@@ -172,7 +172,7 @@
{
XmlSchemaElement el = schema.Items.Count == 1 ?
schema.Items [0] as XmlSchemaElement : null;
- if (el != null && el.UnhandledAttributes.Length > 0) {
+ if (el != null && el.UnhandledAttributes != null &&
el.UnhandledAttributes.Length > 0) {
for (int i = 0; i <
el.UnhandledAttributes.Length; i++) {
XmlAttribute attr =
el.UnhandledAttributes [i];
if (attr.NamespaceURI == msdataNS &&
attr.LocalName == "IsDataSet")
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches