harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko" <alexey.a.petre...@gmail.com>
Subject Re: [classlib][luni] java.net.URL(String, String, int, String) constructor exception thrown sequence (was re: [jira] Commented: (HARMONY-1158) [classlib][luni]Compatibility: java.net.URL new URL("ss", null, -3, null) throws MalformedURLException whil
Date Thu, 14 Sep 2006 12:23:59 GMT
I have not said that it validaites. I said that it can :)

2006/9/14, Stepan Mishura <stepan.mishura@gmail.com>:
> On 9/14/06, Alexey Petrenko wrote:
> >
> > 2006/9/14, Stepan Mishura :
> > > On 9/14/06, Alexey Petrenko wrote:
> > > >
> > > > 2006/9/14, Stepan Mishura :
> > > > > On 9/14/06, Andrew Zhang wrote:
> > > > > >
> > > > > > There are two reasons:
> > > > > >
> > > > > > 1. Spec has explicitly pointed out "No validation of the inputs
is
> > > > > > performed
> > > > > > by this constructor."
> > > > >
> > > > >
> > > > >
> > > > > In this spec. quotation above there is one thing that confuses me
-
> > > > "THIS
> > > > > CONSTRUCTOR". May this mean that validation of inputs is perform,
> > for
> > > > > example, only by corresponding protocol handler?
> > > > >
> > > > > This looks logical because only protocol handler can verify whether
> > > > params
> > > > > are correct or not.
> > > > Almost right. But if RI passes all the parameters to protocol handler
> > > > then it should throw unknown protocol for all these cases. Since "ss"
> > > > is unknown protocol.
> > > > And you do not need a protocol handler to understand that port number
> > > > can not have a negative value :)
> > > Not agree. What if I add a custom protocol handler that accepts negative
> > > port values?
> > It will break RFC 2396 (Uniform Resource Identifiers (URI): Generic
> > Syntax) [1] where port is specified as "port = *digit". And this is
> > unsigned value.
>
>
>
> Then the spec. is not quite correct - the constructor validates some inputs
> :-)
>
> -Stepan
>
> <SNIP>
>
> ------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Alexey A. Petrenko
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message