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

Long.valueOf(String) should cache

XMLWordPrintable

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

      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 ----------

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: