Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7088952

Add "BYTES" constant to primitive wrapper classes

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 8
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b66
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mduigou Mike Duigou
              Reporter:
              mduigou Mike Duigou
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: