Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-02 Thread Alan Bateman
On 01/12/2014 21:09, Seán Coffey wrote: On 01/12/2014 18:54, Daniel Fuchs wrote: on the test side would it be worth testing all public classes available (e.g in rt.jar ?) to ensure that Field.setAccessible works as expected and that we don't hit this issue again ? It might be some what of a

RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Daniel Fuchs
Hi, Please find below a patch for: 8065552: setAccessible(true) on fields of Class may throw a SecurityException webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8065552/webrev.00/ Description of the problem: The following test case passes on 8u20 but fails on 8u40 and above:

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Seán Coffey
Looks fine to me Daniel. Thanks for handling it. I can work on the 7u backport if necessary. on the test side would it be worth testing all public classes available (e.g in rt.jar ?) to ensure that Field.setAccessible works as expected and that we don't hit this issue again ? It might be some

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Martin Buchholz
There's a whole set of invariant tests that should be applied to the entire jdk. Find all the classes that can be loaded, load them, and check all the invariants you can think of!

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Mandy Chung
On 12/1/14 8:29 AM, Daniel Fuchs wrote: 8065552: setAccessible(true) on fields of Class may throw a SecurityException webrev: http://cr.openjdk.java.net/~dfuchs/webrev_8065552/webrev.00/ Thanks for taking this on. Looks okay in general. The comment on Class.classLoader field -

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Daniel Fuchs
Hi Seán, On 01/12/14 18:48, Seán Coffey wrote: Looks fine to me Daniel. Thanks for handling it. I can work on the 7u backport if necessary. Thanks :-) on the test side would it be worth testing all public classes available (e.g in rt.jar ?) to ensure that Field.setAccessible works as

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Mandy Chung
On 12/1/14 10:54 AM, Daniel Fuchs wrote: on the test side would it be worth testing all public classes available (e.g in rt.jar ?) to ensure that Field.setAccessible works as expected and that we don't hit this issue again ? It might be some what of a heavy test for jtreg inclusion though.

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Daniel Fuchs
Hi Mandy, Thanks for the review! The new webrev is here: http://cr.openjdk.java.net/~dfuchs/webrev_8065552/webrev.01/ The compiler doesn't want the diamond operator at line 86. It says that it cannot infer the type argument. So I left it unchanged. The rest of your comments are in. best

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Mandy Chung
On 12/1/14 11:34 AM, Daniel Fuchs wrote: Hi Mandy, Thanks for the review! The new webrev is here: http://cr.openjdk.java.net/~dfuchs/webrev_8065552/webrev.01/ Looks good. Mandy

Re: RFR - 8065552: setAccessible(true) on fields of Class may throw a SecurityException

2014-12-01 Thread Seán Coffey
On 01/12/2014 18:54, Daniel Fuchs wrote: on the test side would it be worth testing all public classes available (e.g in rt.jar ?) to ensure that Field.setAccessible works as expected and that we don't hit this issue again ? It might be some what of a heavy test for jtreg inclusion though. It