[Mono-dev] [Mono-patches] r108492 - in branches/mono-2-0/mcs/class/System.Web: System.Web.UI Test/System.Web.UI

Gert Driesen gert.driesen at telenet.be
Tue Jul 22 15:51:46 EDT 2008


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: mono-devel-list-bounces at lists.ximian.com
[mailto:mono-devel-list-bounces at lists.ximian.com] 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 <gert.driesen at telenet.be>
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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20080722/f4cbbb22/attachment-0001.html 


More information about the Mono-devel-list mailing list