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

Specification of wrapper class valueOf static factories should require caching of boxing range

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 7
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b66
    • CPU:
      generic
    • OS:
      generic

      Description

      The static factory methods Integer.valueOf(int), Long.valueOf(long), etc. were introduced in JDK 5 for javac to implement the caching behavior required by the autoboxing specification. While the specification of those methods say they might cache, they do not require caching of the ranges in question. The specification should be updating to require caching of the boxing range, but clearly state that caching outside of that range may or may not happen.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: