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

Cleanup new Boolean and single character strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
    • Resolved In Build:
      b17
    • CPU:
      generic

      Description

      Two cleanups for classes in the jdk repo.

      The Boolean class has cache for true and false and using it, will save
      memory and will faster than using create new instance of Boolean.

      When a String has length just one, could be replaced by equivalent
      character literals, gaining some performance enhancement.

        Attachments

          Activity

            People

            Assignee:
            rriggs Roger Riggs
            Reporter:
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: