RFR: 8035284: (xs) Remove redundant null initialization
Chris Hegarty
chris.hegarty at oracle.com
Fri Apr 11 20:07:39 UTC 2014
This look good to me. I'm really happy to see these do away. I'll help clean up other areas too.
-Chris
> On 11 Apr 2014, at 20:22, Mike Duigou <mike.duigou at oracle.com> wrote:
>
> Hello all;
>
> This is a simple cleanup changeset that removes redundant initialization of fields to null from a number of collection classes. These field initializations may seem cheap but they do have a cost:
>
> - For volatile fields there is a measurable cost on some benchmarks for these extra initializations.
>
> - Larger byte code in <init> methods.
>
> - For transient fields the initialization is misleading since it does not occur on deserialization.
>
> https://bugs.openjdk.java.net/browse/JDK-8035284
> http://cr.openjdk.java.net/~mduigou/JDK-8035284/0/webrev/
>
> Redundant null initializations in other components/packages will be handled in separate issues.
>
> Mike
More information about the core-libs-dev
mailing list