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

Only run assertion on Integer autoboxing cache size once

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8
    • 8
    • core-libs
    • b40
    • generic
    • generic
    • Verified

      The JLS mandates a certain range of integers from -128 to 127 to cached by the autoboxing mechanism, JSL 5.1.7. An assert checking one end of this range appears in Integer.valueOf. However, it would be sufficient, and more efficient, to have the assert only run once in the initialization of the IntegerCache class used to store the cached data.

            alanb Alan Bateman
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: