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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 7
    • 5.0
    • core-libs
    • b66
    • generic
    • generic

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: