[Mono-bugs] [Bug 29131][Maj] New - Trying to close a BinaryReader say that the base stream is already closed

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
19 Aug 2002 17:58:23 -0000


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 kiwnix@yahoo.es.

http://bugzilla.ximian.com/show_bug.cgi?id=29131

--- shadow/29131	Mon Aug 19 13:58:23 2002
+++ shadow/29131.tmp.2612	Mon Aug 19 13:58:23 2002
@@ -0,0 +1,52 @@
+Bug#: 29131
+Product: Mono/Class Libraries
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details: Debian debianplanet.org cvs packages
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kiwnix@yahoo.es               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Trying to close a BinaryReader say that the base stream is already closed
+
+Description of Problem:
+When you try to close a BinaryReader that is created over a MemoryStream it
+says the MemoryStream is allready Closed.
+
+Actual Results:
+
+System.IO.IOException: MemoryStream already closed
+
+Expected Results:
+
+The Reader will be closed.
+
+Additional Information:
+It is shown in The BinaryReader NUnit test.
+
+TestCase:
+
+using System;
+using System.IO;
+
+public class prueba
+{
+	public static void Main ()
+	{
+		byte [] b = new byte [30];
+		MemoryStream m = new MemoryStream (b);
+		try {
+			BinaryReader r = new BinaryReader (m);
+			r.Close ();
+		} catch (Exception e) {
+			Console.WriteLine (e.ToString ());
+		}
+	}
+}