[Mono-bugs] [Bug 62422][Nor] New - StringBuilder doesn't throw exception when size exceeded

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 4 Aug 2004 08:18:16 -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 luke@octerbar.net.


--- shadow/62422	2004-08-04 08:18:16.000000000 -0400
+++ shadow/62422.tmp.23559	2004-08-04 08:18:16.000000000 -0400
@@ -0,0 +1,43 @@
+Bug#: 62422
+Product: Mono: Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Fedora Core 2
+Status: NEW   
+Severity: 001 One hour
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: luke@octerbar.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: StringBuilder doesn't throw exception when size exceeded
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem: When appending data to an instance of StringBuilder
+it doesn't throw the required ArgumentOutOfRangeException when the capacity
+is exceeded.
+Steps to reproduce the problem:
+1. Create an instance of StringBuilder with a limited capacity.
+2. Append data till the capacity is exceeded.
+3. Wait for nothing to happen.
+Actual Results:
+Nothing happens.
+Expected Results:
+ArgumentOutOfRangeException should be thrown.
+How often does this happen? 
+Every time.
+Additional Information:
+The MSDN doco for the append method states that an
+ArgumentOutOfRangeException  will be thrown if:
+"Enlarging the value of this instance would exceed MaxCapacity."