JDK-7088952 : Add "BYTES" constant to primitive wrapper classes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 8
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-09-09
  • Updated: 2017-05-16
  • Resolved: 2012-11-14
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b66Fixed
Related Reports
Relates :  
Description
Add a BYTES constant to each of the primitive wrapper types. The SIZE value provided with primitive types is expresses the size of the type in bits. Frequently the size of a type in bytes is needed as bytes are the smallest unit of allocation. The most frequent use of the SIZE constant is to determine the size in in bytes for a type via (type).SIZE / Byte.SIZE

This change adds a constant BYTES to each of the primitive wrapper classes (Byte, Character, Double, Float, Integer, Long, Short) with the  calculation (type).SIZE / Byte.SIZE already made.

Comments
verified in b85
12-04-2013

EVALUATION add BYTES static constants
21-09-2011