http://cr.openjdk.java.net/~dholmes/7103570/webrev/
Basic fix is to call getDeclaredField() inside a doPrivileged block.
In addition the call to checkPackageAccess is now conditional - it
allows for, for example, a class in sun.misc to create a field updater
for another class in sun.misc.
Finally the @throws spec for newUpdater has been expanded to say:
@throws RuntimeException with a nested reflection-based
exception if the class does not hold field or is the wrong type,
+ or the field is inaccessible to the caller according to Java language
+ access control
This last part requires CCC approval which I will initiate.
I have a glitch with running the test under jtreg but hopefully that
will get sorted soon (jtreg fails if a security manager is installed).
Thanks,
David Holmes
------------