RFR 8213616 URLPermission with query or fragment behaves incorrectly

Chris Hegarty chris.hegarty at oracle.com
Mon Nov 12 11:14:43 UTC 2018


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?


More information about the net-dev mailing list