JDK 8 code review request for 6838776 Defer initialization of static fields in java.math.BigInteger

Joe Darcy joe.darcy at oracle.com
Tue Sep 6 13:20:03 UTC 2011


Rémi Forax wrote:
> On 09/03/2011 03:26 AM, Mike Duigou wrote:
>> Looks good. Nice little performance tweak.
>>
>> You may want to use ExceptionInInitializerError rather than plain Error.
>>
>> Mike
>
> Mike,
> in that case you will get two ExceptionInInitializerError ?
>
> Joe, about the patch, I think the two methods in the holder should
> not be private (but package visible) to avoid the generation of 
> accessor methods
> by the compiler.

Pushed without the private modifiers.

Thanks for the suggestion,

-Joe

>
> Otherwise, looks good.
>
> Rémi
>
>>
>> On Sep 2 2011, at 17:44 , joe.darcy at oracle.com wrote:
>>
>>> 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