[Mono-bugs] [Bug 52034][Wis] New - Calling ToString() or Value property on Match, inconsistent with MS.Net
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 11 Dec 2003 04:31:58 -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 gsanjay@novell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=52034
--- shadow/52034 2003-12-11 04:31:58.000000000 -0500
+++ shadow/52034.tmp.13746 2003-12-11 04:31:58.000000000 -0500
@@ -0,0 +1,52 @@
+Bug#: 52034
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: gsanjay@novell.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Calling ToString() or Value property on Match, inconsistent with MS.Net
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+Calling ToString() or Value property on Match object returned from
+Regex.Match() method call, when no match has been established results in an
+exception to be thrown.
+
+
+Steps to reproduce the problem:
+1. Please complie and execute the attachment ExpressionBug.cs
+
+Actual Results:
+Exception caught: System.NullReferenceException: A null value was found
+where an object instance was required
+in <0x00019> System.Text.RegularExpressions.Capture:get_Value ()
+in <0x00011> System.Text.RegularExpressions.Capture:ToString ()
+in <0x000e2> Bug.MainClass:Main ()
+
+
+Expected Results:
+
+
+
+String <xyz> doesn't match pattern <[0-9A-F]{8}>.
+
+
+String <xyz> doesn't match pattern <[0-9A-F]+>.
+
+
+How often does this happen?
+Always
+
+Additional Information:
+Please see the attachment for the fix