RFR 8160439: Replace asserts in VarHandle.AccessMode with tests
Roger Riggs
Roger.Riggs at Oracle.com
Tue Jun 28 13:38:47 UTC 2016
Hi Paul,
Looks fine, very straightforward
Regards, Roger
On 6/28/2016 6:50 AM, Paul Sandoz wrote:
> Hi,
>
> Please review:
>
> http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8160439-vh-access-mode-remove-assert/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8160439-vh-access-mode-remove-assert/webrev/>
>
> This removes an assert that can load dependent locale-based classes too early in the startup process when say AtomicInteger is modified to use VarHandle (in a 166 webrev Martin has prepared). This appears to kibosh locale-behaviour which was thankfully caught in a test (java/util/Locale/Bug4152725.java).
>
> The removed assert has been replaced with a test.
>
> —
>
> Separately there might be a more principled way to ensure VarHandle and dependent classes are loaded/initialized at a well defined point. Although in this case it would not have helped, it would help define a clearer barrier before which a VarHandle cannot be used.
>
> Paul.
More information about the core-libs-dev
mailing list