Parsing too strict in java.net.URI?

David Lloyd david.lloyd at redhat.com
Fri Dec 1 18:12:28 UTC 2017


On Mon, Nov 14, 2016 at 12:16 PM, Chris Hegarty
<chris.hegarty at oracle.com> wrote:
> David,
>
> On 14/11/16 16:47, David M. Lloyd wrote:
>>
>> The following statement:
>>
>> URI uri = URI.create("local:");
>>
>> fails with an exception like this:
[...]
>> However AFAICT scheme-only URIs are, while not strictly allowed by RFC
>> 2396 [1], in common usage (for example, "about:" in web browsers).
>
> This seems to be allowable in the "more recent" RFC [2], that obsoletes
> 2396, which of course java.net.URI does not, yet, support. There was an
> effort to support 3986 a number of years ago, but it was not successful.
> The desire to support, keep up with standards, etc, has caused us to
> give consideration to supporting 3986, but as of yet nothing concrete.

Have there been any recent developments, updates, or insights on this
issue?  I wonder if a gradual change to RFC 3986 support might be more
appropriate: for example, start with *just* accepting empty SSP.

If the compatibility requirements of java.net.URI are too stringent to
allow for any change, then surely all that can be done is to deprecate
& replace it, which would need no further delay that I can see.
-- 
- DML


More information about the net-dev mailing list