Review Request: 7088913/7088952 : Additions to primitive wrappers

David Holmes david.holmes at oracle.com
Thu Sep 22 01:25:18 UTC 2011


Mike,

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.

David

> Mike
>
> On Sep 21 2011, at 03:36 , Ulf Zibis wrote:
>
>> Hi,
>>
>> why don't we have Boolean.SIZE and Boolean.BYTES ?
>>
>> -Ulf
>>
>>
>> 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).
>>>
>>>    http://cr.openjdk.java.net/~mduigou/7088913/0/webrev/
>>>
>>> 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.
>>>
>>> Thanks,
>>>
>>> Mike
>



More information about the core-libs-dev mailing list