RFR: 8141678: sun.invoke.util.Wrapper eagerly initializes all integral type caches
John Rose
john.r.rose at oracle.com
Tue Nov 10 20:14:54 UTC 2015
On Nov 10, 2015, at 10:53 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>
> Regarding the fix, can we avoid touching primitive boxes and lazily cache the values on Wrapper side? "static final @Stable Object[] zeros" + Wrapper.zero() indexing that array by Wrapper.ordinal().
I would greatly prefer that. Using "new Integer(x)" is a hack. We hope to deprecate and remove the public constructor some day.
More information about the core-libs-dev
mailing list