JDK 8 Code Review Request: 7093090 Reduce synchronization in java.security.Policy.getPolicyNoCheck

Valerie (Yu-Ching) Peng valerie.peng at oracle.com
Mon Nov 21 20:30:35 UTC 2011


Sean,

Your changes look good to me.

Thanks,
Valerie

On 11/17/11 08:58, Sean Mullan wrote:
> Hi Valerie,
>
> Could you review this one for me?
>
> http://cr.openjdk.java.net/~mullan/webrevs/7093090/webrev.00/
>
> This one was tricky to fix, but I have confirmed that it does indeed fix the
> thread contention issue with the customer that reported this.
>
> The fix involved adding an initialized flag to indicate when the system-wide
> policy has been initialized and storing both the flag and the Policy object in
> an AtomicReference. Then, I also used the double-check locking idiom to avoid
> locking the Policy class when the Policy had already been initialized.
>
> Thanks,
> Sean
>   




More information about the security-dev mailing list