hg: jdk8/tl/jdk: 7103570: AtomicIntegerFieldUpdater does not work when SecurityManager is installed
Ulf Zibis
Ulf.Zibis at gmx.de
Tue May 8 10:02:51 UTC 2012
Hi all,
I'm a little bit late, but I just have seen:
(1) some indentations in the patch are broken
(2) following code snipped is repeated many times:
+ ClassLoader cl = tclass.getClassLoader();
+ ClassLoader ccl = caller.getClassLoader();
+ if ((ccl != null) && (ccl != cl) &&
+ ((cl == null) || !isAncestor(cl, ccl))) {
+ sun.reflect.misc.ReflectUtil.checkPackageAccess(tclass);
+ }
Wouldn't it be better, to move it in a method, maybe in sun.reflect.misc.ReflectUtil ?
-Ulf
Am 08.05.2012 09:36, schrieb david.holmes at oracle.com:
> Changeset: 48513d156965
> Author: dholmes
> Date: 2012-05-08 02:59 -0400
> URL: http://hg.openjdk.java.net/jdk8/tl/jdk/rev/48513d156965
>
> 7103570: AtomicIntegerFieldUpdater does not work when SecurityManager is installed
> Summary: Perform class.getField inside a doPrivileged block
> Reviewed-by: chegar, psandoz
>
> ! src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java
> ! src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java
> ! src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java
> + test/java/util/concurrent/atomic/AtomicUpdaters.java
>
>
More information about the security-dev
mailing list