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

Cleanup new Boolean and single character strings

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • core-libs
    • b17
    • generic

      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.

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

              Created:
              Updated:
              Resolved: