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

Long.valueOf(String) should cache

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P5
    • None
    • 5.0
    • core-libs

    Description

      A DESCRIPTION OF THE REQUEST :
      The source code for Long.valueOf(String) shows that it returns new Long(parseLong(...)). It really should return Long.valueOf(parseLong(...)) so that it can take advantage of the cache.

      JUSTIFICATION :
      More efficient.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      See above
      ACTUAL -
      See above

      ---------- BEGIN SOURCE ----------
      None -- see source code for java.lang.Long
      ---------- END SOURCE ----------

      Attachments

        Issue Links

          Activity

            People

              darcy Joe Darcy
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: