[Mono-dev] [PATCH] Uri.IsWellFormedUriString should not throw an exception.

Miguel de Icaza miguel at novell.com
Wed Jan 28 12:39:41 EST 2009


Hello!

   This looks fine;  Can you commit to trunk and 2-4?

> Hello Miguel,
> 
> Thanks for taking a closer look at this.  I have attached another
> patch that should work.
> 
> -bill
> 
> On Wed, Jan 28, 2009 at 9:28 AM, Miguel De Icaza <miguel at novell.com> wrote:
> > Hello,
> >
> >> 1) MonoTests.System.UriTest3.IsWellFormedUriString_BadUriKind :
> >> System.ArgumentException was expected
> >
> > It seems that all we have to do is make sure that we do validate the UriKind
> > value that is passed to IsWellFormedUriString.
> >
> > This test in particular passes a value that is out of range (an invalid
> > UriKind), so the new patch should just make sure that it is validating and
> > throwing an exception on the second parameter to IsWerllFormedUriString.
> >
> > Miguel.
> >
> >>
> >>
> >> On Sat, Jan 24, 2009 at 9:06 PM, Miguel De Icaza <miguel at novell.com>
> >> wrote:
> >>>
> >>> Hello Bill,
> >>>
> >>> Any chance of redoing the code as suggested by Robert?
> >>>
> >>> If so, it is OK to get this on the 2.4 branch.
> >>>
> >>> Miguel.
> >>> On Jan 21, 2009, at 12:01 PM, Bill Holmes wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> The attached patch fixes the attached test.cs.
> >>>>
> >>>> Uri.IsWellFormedUriString calls the .ctor which throws an exception.
> >>>> The .ctor throwing the exception is expected behavior,
> >>>> IsWellFormedUriString throwing is not expected.
> >>>>
> >>>> I would also like to apply this to the 2.4 branch.
> >>>>
> >>>> -bill
> >>>>
> >>>> 2009-01-21  Bill Holmes  <billholmes54 at gmail.com>
> >>>>
> >>>>      * Uri.cs (IsWellFormedUriString):  Changing IsWellFormedUriString
> >>>>        to not throw an exception but return false instead.
> >>>>
> >>>>      Contributed under MIT/X11 license.
> >>>> <
> >>>> test
> >>>> .cs
> >>>>>
> >>>> <
> >>>> IsWellFormedOriginalString
> >>>> .patch>_______________________________________________
> >>>> Mono-devel-list mailing list
> >>>> Mono-devel-list at lists.ximian.com
> >>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >>>
> >>>
> >> _______________________________________________
> >> Mono-devel-list mailing list
> >> Mono-devel-list at lists.ximian.com
> >> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> >
> >



More information about the Mono-devel-list mailing list