[Mono-bugs] [Bug 49504][Nor] New - String.Join throws exception when any element in the parameter array is null
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 9 Oct 2003 21:29:42 -0400 (EDT)
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 rodolfocampero@hotmail.com.
http://bugzilla.ximian.com/show_bug.cgi?id=49504
--- shadow/49504 2003-10-09 21:29:42.000000000 -0400
+++ shadow/49504.tmp.7053 2003-10-09 21:29:42.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 49504
+Product: Mono/Class Libraries
+Version: unspecified
+OS:
+OS Details: Linux tartaruga 2.4.20-8 #1 Thu Mar 13 16:42:56 EST 2003 i586 i586 i386 GNU/Linux
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: rodolfocampero@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Summary: String.Join throws exception when any element in the parameter array is null
+
+Description of Problem:
+The static method Join of the class String fails when an array passed as
+the second parameter contains at least one null value.
+
+Steps to reproduce the problem:
+Compile and run the following program:
+
+using System;
+namespace Test {
+ public class TestJoin {
+ public static void Main(string[] args) {
+ string[] array = new string[] {"hello ", null, "world!"};
+ Console.WriteLine(String.Join(String.Empty, array));
+ }
+ }
+}
+
+Actual Results:
+Unhandled Exception: System.NullReferenceException: A null value was found
+where an object instance was required
+
+Expected Results:
+hello world!
+
+How often does this happen?
+Always