[Mono-bugs] [Bug 81834][Nor] Changed - System.String.Format should make null object ""

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jun 8 15:16:51 EDT 2007

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 atsushi at ximian.com.


--- shadow/81834	2007-06-08 14:46:41.000000000 -0400
+++ shadow/81834.tmp.7995	2007-06-08 15:16:51.000000000 -0400
@@ -1,14 +1,14 @@
 Bug#: 81834
 Product: Mono: Class Libraries
 Version: 1.2
 OS: All
 OS Details: 
-Status: NEW   
+Status: RESOLVED   
+Resolution: NOTABUG
+Severity: Unknown
 Priority: Normal
 Component: System
 AssignedTo: mono-bugs at ximian.com                            
 ReportedBy: vgiszpenc at dsci.com               
 QAContact: mono-bugs at ximian.com
 TargetMilestone: ---
@@ -91,6 +91,50 @@
 Additional Information:
 There may be other places that do formatting.  I am not familiar enough
 with .Net to say that this pattern is only in String and StringBuilder.
+------- Additional Comments From atsushi at ximian.com  2007-06-08 15:16 -------
+.NET does raise the same error as mono does.
+atsushi at PC ~/tests
+$ gmcs 81834.cs
+atsushi at PC ~/tests
+$ ./81834.exe
+Unhandled Exception: System.ArgumentNullException: Value cannot be null.
+Parameter name: args
+   at System.String.Format(IFormatProvider provider, String format,
+Object[] args)
+   at System.IO.TextWriter.WriteLine(String format, Object[] arg)
+   at System.IO.TextWriter.SyncTextWriter.WriteLine(String format,
+Object[] arg)
+   at Test.Main()
+atsushi at PC ~/tests
+$ mono ./81834.exe
+Unhandled Exception: System.ArgumentNullException: Argument cannot be
+  at System.String.FormatHelper (System.Text.StringBuilder result,
+IFormatProvider provider, System.String format, System.Object[] args)
+  at System.String.Format (IFormatProvider provider, System.String
+format, System.Object[] args) [0x00000]
+  at System.String.Format (System.String format, System.Object[] args)
+  at System.IO.TextWriter.Write (System.String format, System.Object[]
+arg) [0x00000]
+  at System.IO.TextWriter.WriteLine (System.String format,
+System.Object[] arg)
+  at System.IO.SynchronizedWriter.WriteLine (System.String format,
+System.Object[] value) [0x00000]
+  at System.Console.WriteLine (System.String format, System.Object[]
+arg) [0x00000]
+  at Test.Main () [0x00000]

More information about the mono-bugs mailing list