Re-Request for Re-Review : 7088952 : Add "BYTES" constant to primitive wrapper classes

Mike Duigou mike.duigou at
Wed Nov 7 23:08:52 UTC 2012

Hello all;

A long time ago [1] this patch was put forward for review. Though the request was approved the patch was never committed because some of the followup questions were not answered.

The summary motivation for this issue is that measuring the size of the primitive types in bytes is more frequently used than bits because bytes are the minimum unit of allocation in Java. The proposed BYTES constant is a convenience to avoid many repetitions of Integer.SIZE / Byte.SIZE where the size in bytes is desired. There are many of these cases already in the JDK that are currently using locally defined constants or manifest constants ("magic" numbers) [2] that could benefit from this change to improve clarity. Many other external usages could take advantage of these constants as well.

Unless there are objections I will go forward with pushing this change on Nov 9th, 2012 as originally reviewed with the original reviewers.



More information about the core-libs-dev mailing list