JDK 8 code review request for 6838776 Defer initialization of static fields in java.math.BigInteger
Sebastian Sickelmann
sebastian.sickelmann at gmx.de
Sat Sep 3 07:11:32 UTC 2011
Looks good to me.
Nice pattern to use static initialization on first usage of UnsafeHolder
instead of using lazy initialization code with double-check-ideom for
synchronizing in the two accessing methods. It should works for all vm i
have workes with (sun/oracle,ibm) , but is it garanted by vm spec that
it is not initialized while initializing Big{Integer,Decimal}?
-- Sebastian
Am 03.09.2011 02:44, schrieb joe.darcy at oracle.com:
> Hello.
>
> Please review this change to only instantiated an Unsafe object in
> BigInteger and BigDecimal if serialization is done:
>
> 6838776 Defer initialization of static fields in java.math.BigInteger
> http://cr.openjdk.java.net/~darcy/6838776.0/
>
> Thanks,
>
> -Joe
More information about the core-libs-dev
mailing list