Remove the assert in Integer.valueOf()
Alan Bateman
Alan.Bateman at oracle.com
Mon Apr 30 16:09:16 UTC 2012
On 27/04/2012 23:38, Rémi Forax wrote:
> :
> I have moved the assert into the static block of IntegerCache.
> For Alan, because IntegerCache is loaded when Integer.valueOf() is
> called the first time
> the assert code is checked around the same time so after the system
> init but only once.
>
> webrev is here:
> http://cr.openjdk.java.net/~forax/integer_valueof/
> and I need a bug for it :)
Looks fine me as the initialization is now different compared to when
this property was introduced (when introduced the IntegerCache was
initialized via System.initializeSystemClass).
-Alan.
More information about the core-libs-dev
mailing list