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

java.lang.Boolean improvements

XMLWordPrintable

    • kestrel
    • generic, x86
    • generic, windows_nt



      Name: dbT83986 Date: 01/26/99


      (1) Boolean.valueOf(String) returns a new Boolean object instead of
      returning one of the predefined versions, Boolean.TRUE or Boolean.FALSE.

      (2) Boolean.toBoolean(String) could use String.equalsIgnoreCase()
      instead of String.toLowercase() and String.equals().
      (Review ID: 33327)
      ======================================================================

      Name: krT82822 Date: 08/09/99


      Currently, the Boolean.valueOf(String) method always produces a
      new object. This behavior is wasteful of resources. It should be
      redesigned to return Boolean.TRUE or Boolean.FALSE as the case
      demands. This is not a terribly important improvement, buts its
      completely safe and every little bit helps.

      (bug # 4206052 includes a comment about valueOf(), but doesn't explicitly comment on the inefficiency issue)
      (Review ID: 93694)
      ======================================================================

            mmcclosksunw Michael Mccloskey (Inactive)
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: