Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Peter Levart
On 02/04/2015 05:19 PM, Chris Hegarty wrote: On 04/02/15 16:01, Peter Levart wrote: On 02/04/2015 04:45 PM, Alan Bateman wrote: On 04/02/2015 15:10, Weijun Wang wrote: It should be checked, otherwise a non-initialized parent object comes into being. In general then permission checks in const

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Chris Hegarty
On 04/02/15 16:01, Peter Levart wrote: On 02/04/2015 04:45 PM, Alan Bateman wrote: On 04/02/2015 15:10, Weijun Wang wrote: It should be checked, otherwise a non-initialized parent object comes into being. In general then permission checks in constructors are a bad idea but we have an establish

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Peter Levart
On 02/04/2015 04:45 PM, Alan Bateman wrote: On 04/02/2015 15:10, Weijun Wang wrote: It should be checked, otherwise a non-initialized parent object comes into being. In general then permission checks in constructors are a bad idea but we have an established idiom that has the no-arg constructor

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Alan Bateman
On 04/02/2015 15:10, Weijun Wang wrote: It should be checked, otherwise a non-initialized parent object comes into being. In general then permission checks in constructors are a bad idea but we have an established idiom that has the no-arg constructor invoking a static method that does the perm

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Weijun Wang
It should be checked, otherwise a non-initialized parent object comes into being. On 2/4/2015 22:38, Peter Levart wrote: Just a thought,... Is JVM bytecode verifier checking that a constructor chains to super constructor? If yes, we are ok. If not, specially crafted bytecode could skip securit

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Chris Hegarty
Agreed. Updated in-place http://cr.openjdk.java.net/~chegar/8064924/03/specdiff/overview-summary.html -Chris. On 04/02/15 14:44, Alan Bateman wrote: On 04/02/2015 14:29, Peter Levart wrote: : I agree that this is the most appropriate way with which you can force some provider's class code (t

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Alan Bateman
On 04/02/2015 14:29, Peter Levart wrote: : I agree that this is the most appropriate way with which you can force some provider's class code (the constructor) in the call stack so that you get correct AccessControlContext to check against. But the name starts to sound like German words. :-)

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Peter Levart
On 02/04/2015 03:29 PM, Peter Levart wrote: On 02/04/2015 02:54 PM, Chris Hegarty wrote: On 02/02/15 20:52, Alan Bateman wrote: I'm happy with this approach. One outstanding point from the discussion is whether the URLStreamHandlerFactory implementation will need to be granted RuntimePermi

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Peter Levart
On 02/04/2015 02:54 PM, Chris Hegarty wrote: On 02/02/15 20:52, Alan Bateman wrote: I'm happy with this approach. One outstanding point from the discussion is whether the URLStreamHandlerFactory implementation will need to be granted RuntimePermission("setFactory"), if so then this will nee

Re: RFR 8064924: Update java.net.URL to work with modules

2015-02-04 Thread Chris Hegarty
On 02/02/15 20:52, Alan Bateman wrote: I'm happy with this approach. One outstanding point from the discussion is whether the URLStreamHandlerFactory implementation will need to be granted RuntimePermission("setFactory"), if so then this will need to go into the javadoc. I think that we sh