RFR 4906983: java.net.URL constructors throw MalformedURLException in undocumented way

Sebastian Sickelmann sebastian.sickelmann at gmx.de
Tue Sep 15 03:25:14 UTC 2015


Am 14.09.2015 um 11:02 schrieb Chris Hegarty:
> On 13/09/15 19:03, Mark Sheppard wrote:
>>
>> I was thinking as a change for all constructors, as there are URL, which
>> may overload authority part's structural elements such that port
>> might be
>> a "remote object id",  or some other form of token.
>
> On 13/09/15 14:07, Mark Sheppard wrote:
> > a more generalized description for  MalformedURLException  could be
> > used, e.g.
> >
> > if the parsed URL fails to comply with the scheme specific syntax of
> > the associated protocol.
>
> But, looking at the code, that is not strictly true for the non-spec
> accepting constructors. That is why I asked the question.
>
> -Chris.

So the hint "if the parsed URL fails to comply with the scheme specific
syntax of the associated protocol." can be added to
the "spec"-accepting constructors?
Should we avoid the word "schema" because it is unfortunatly not used
inside the documentation? LIke
"if the parsed URL fails to comply with the specific syntax of the
associated protocol" ?

-- Sebastian

>
>
>> OK, that's fine
>>
>> On 13/09/2015 15:25, Chris Hegarty wrote:
>>> Is this suggested wording for the “spec” accepting constructors?  I
>>> think what we have for the constructors accepting protocol, host,
>>> port, etc, is more accurate.
>>
>



More information about the net-dev mailing list