2007-04-16 Marek Habersack <mhabersack@novell.com>
authorMarek Habersack <grendel@twistedcode.net>
Mon, 16 Apr 2007 10:17:42 +0000 (10:17 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Mon, 16 Apr 2007 10:17:42 +0000 (10:17 -0000)
* SectionGroupInfo.cs: another (and final, hopefully) fix for bug
#81321 and several other related issues that were discovered by
the way. Thanks to Atsushi for help with XmlReader!

svn path=/trunk/mcs/; revision=75753

mcs/class/System.Configuration/System.Configuration/ChangeLog
mcs/class/System.Configuration/System.Configuration/SectionGroupInfo.cs

index 76e94cb368a9b4c2cb2e982bcb3966f5e5e80f7c..2cc83b57cf441bd49887e624bd9582ac4adcda6b 100644 (file)
@@ -1,3 +1,9 @@
+2007-04-16  Marek Habersack  <mhabersack@novell.com>
+
+       * SectionGroupInfo.cs: another (and final, hopefully) fix for bug
+       #81321 and several other related issues that were discovered by
+       the way. Thanks to Atsushi for help with XmlReader!
+
 2007-04-15  Marek Habersack  <mhabersack@novell.com>
 
        * SectionGroupInfo.cs: another incarnation of the fix for bug
index f70212dbe39ab2fb671715bd185e224b1346b8c1..dd3ca26ae378e8fcd60b555dcbbdf3e4deb3d681 100644 (file)
@@ -272,10 +272,13 @@ namespace System.Configuration
                public override void ReadData (Configuration config, XmlTextReader reader, bool overrideAllowed)
                {
                        reader.MoveToContent ();
-                       reader.ReadStartElement ();
-                       ReadContent (reader, config, overrideAllowed, false);
-                       reader.MoveToContent ();
-                       reader.ReadEndElement ();
+                       if (!reader.IsEmptyElement) {
+                               reader.ReadStartElement ();
+                               ReadContent (reader, config, overrideAllowed, false);
+                               reader.MoveToContent ();
+                               reader.ReadEndElement ();
+                       } else
+                               reader.Read ();
                }
                
                void ReadContent (XmlTextReader reader, Configuration config, bool overrideAllowed, bool root)
@@ -313,11 +316,6 @@ namespace System.Configuration
                                        }
                                        continue;
                                }
-                               
-                               if (reader.IsEmptyElement) {
-                                       reader.Skip ();
-                                       continue;
-                               }
                        
                                ConfigInfo data = GetConfigInfo (reader, this);
                                if (data != null)