[Mono-bugs] [Bug 51267][Nor] New - Broken mcs/class/System.XML/System.Xml/XmlTextReader.cs
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 21 Nov 2003 11:51:46 -0500 (EST)
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 rkumar@novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=51267
--- shadow/51267 2003-11-21 11:51:46.000000000 -0500
+++ shadow/51267.tmp.29309 2003-11-21 11:51:46.000000000 -0500
@@ -0,0 +1,73 @@
+Bug#: 51267
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System.XML
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: rkumar@novell.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Broken mcs/class/System.XML/System.Xml/XmlTextReader.cs
+
+Description of Problem:
+Building MCS fails with PROFILE=net_1_0.
+
+Steps to reproduce the problem:
+1. Try building MCS with "make PROFILE=net_1_0"
+
+Actual Results:
+Compilation fails with following error:
+MONO_PATH="../../class/lib:$MONO_PATH" mono ../../mcs/mcs.exe /d:NET_1_0
+-g /noconfig /unsafe /r:mscorlib.dll /r:System.dll /nowarn:649 /nowarn:169
+/target:library /out:../../class/lib/System.Xml.dll @System.Xml.dll.sources
+System.Xml.Schema/XmlSchemaSimpleType.cs(50) warning CS0108: The keyword
+new is required on `System.Xml.Schema.XmlSchemaSimpleType.Datatype' because
+it hides inherited member `XmlSchemaType.Datatype'
+System.Xml/XmlTextReader.cs(661) error CS0103: The name `value.Substring'
+could not be found in `System.Xml.XmlTextReader'
+System.Xml/XmlTextReader.cs(659) error CS0163: Control cannot fall through
+from one case label to another
+Compilation failed: 2 error(s), 1 warnings
+make[2]: *** [../../class/lib/System.Xml.dll] Error 1
+
+
+Expected Results:
+Build should not fail.
+
+How often does this happen?
+Always.
+
+Additional Information:
+Following patch makes the build successful, but I'm not sure about its
+correctness, ;-p
+
+Index: MONO/src/mcs/class/System.XML/System.Xml/XmlTextReader.cs
+===================================================================
+RCS file: /mono/mcs/class/System.XML/System.Xml/XmlTextReader.cs,v
+retrieving revision 1.97
+diff -u -r1.97 XmlTextReader.cs
+--- MONO/src/mcs/class/System.XML/System.Xml/XmlTextReader.cs 26 Oct 2003
+03:39:02 -0000 1.97
++++ MONO/src/mcs/class/System.XML/System.Xml/XmlTextReader.cs 21 Nov 2003
+17:50:57 -0000
+@@ -654,9 +654,11 @@
+ if (readState != ReadState.Interactive)
+ return String.Empty;
+
+
++ StringBuilder innerXmlBuilder = null;
++
+ switch (NodeType) {
+ case XmlNodeType.Attribute:
+- return value.Substring (1, value.Length - 2);
++ return Value.Substring (1, Value.Length - 2);
+ case XmlNodeType.Element:
+ if (IsEmptyElement)
+ return String.Empty;