Dean,

 

What I meant to say was that both Stream.Length and Stream.Position can
throw a NotSupportedException when the stream is not seekable. I just
changed Deserialize to no longer special-case a non-seekable MemoryStream,
thereby not invoking Stream.Position.

 

I'll commit a slightly revised fix and a fully revised test (which I have
locally before I noticed your commit) to the branch and HEAD.

 

Gert

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dean Brettle
Sent: dinsdag 22 juli 2008 21:31
To: Gert Driesen
Cc: mono-devel-list
Subject: Re: [Mono-dev] [Mono-patches] r108492 - in
branches/mono-2-0/mcs/class/System.Web: System.Web.UI Test/System.Web.UI

 

On Tue, Jul 22, 2008 at 12:12 PM, Gert Driesen <[EMAIL PROTECTED]>
wrote:

Also, your patch was not complete; Stream.Length can/will also throw a
NotSupportedException when the stream is unseekable. I'll commit a slighty
modified version to SVN HEAD in a few minutes.


I'm not sure what you man by unseekable vs CanSeek == false.  You mean it is
possible for Stream.Length to throw an exception even if CanSeek== true?  If
so, I guess you are going to handle that case with a try/catch.  FWIW, if we
are going to add a try/catch for the unseekable case, I recommend making it
also handle MemoryStreams which are not publicly accessible.  The code
currently throws an exception in that case as well.

--Dean

_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to