RFR 8213616 URLPermission with query or fragment behaves incorrectly
Michael McMahon
michael.x.mcmahon at oracle.com
Mon Nov 12 18:09:34 UTC 2018
Hi Chris,
I agree with your comments. A small spec change would make it crystal clear.
I'd like to structure it so that it's clearer that the query and
fragment are ignored though.
Updated webrev at
http://cr.openjdk.java.net/~michaelm/8213616/webrev.2/index.html
Thanks,
Michael
On 12/11/2018, 11:14, Chris Hegarty wrote:
> Michael,
>
> On 09/11/18 15:48, Michael McMahon wrote:
>> Could i get the following small change reviewed please?
>>
>> http://cr.openjdk.java.net/~michaelm/8213616/webrev.1/
>
> The change looks ok to me. Just a few comments:
>
> 1) The specification already mentions that "any query or
> fragment components of the url are ignored when constructing
> URLPermissions", so this behavior change seems inline with
> that. Good.
>
> Maybe the expected structure in the class-level description
> should be updated to indicate this:
> scheme : // authority [ / path ] ** [?query] [#fragment] **
>
> 2) On the code: if a query exists then it must precede the
> fragment, so there should be no need to check for `#` after
> striping the query. Maybe we need a test to assert this?
>
> -Chris.
More information about the net-dev
mailing list