Review Request: 7088913/7088952 : Additions to primitive wrappers
david.holmes at oracle.com
Thu Sep 22 01:25:18 UTC 2011
On 22/09/2011 9:54 AM, Mike Duigou wrote:
> I will create a request to add Boolean.SIZE though I am not sure adding a Boolean.BYTES is appropriate for something less than Byte.Size in size. Is it 1-bit? Is it 1-byte? The answer is dependant upon usage and I don't think we can force a single answer.
I don't think SIZE or BYTES make any sense for Boolean as booleans are
unsized in the Java language. At the VM level they map to ints.
For that matter I'm not sure the addition of BYTES is worth the effort.
> On Sep 21 2011, at 03:36 , Ulf Zibis wrote:
>> why don't we have Boolean.SIZE and Boolean.BYTES ?
>> Am 20.09.2011 22:11, schrieb Mike Duigou:
>>> Hello all;
>>> Here's a webrev for two small additions to the primitive wrapper types (Boolean, Byte, Character, Double, Float, Integer, Long, Short).
>>> The webrev combines two issues:
>>> 7088913: Add compatible static hashCode(primitive) to primitive wrapper classes
>>> 7088952: Add "BYTES" constant to primitive wrapper classes
>>> Stuart Marks has already peer reviewed this for me but a sharp eyed reader may catch something previously missed. As it's already been reviewed I will commit on Friday if there is no feedback.
More information about the core-libs-dev