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

Misleading comment in source code for Boolean.toString

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      1.1
    • CPU:
      sparc
    • OS:
      solaris_1
    • Verification:
      Not verified

      Description

      The source code for Boolean says:

          /**
           * Returns a new String object representing this Boolean's value.
           */
          public String toString() {
      return value ? "true" : "false";
          }

      but in fact the String object returned is not "new". The comments for
      Object.toString and Character.toString do not promise a "new" object.
      I believe the comment for Boolean.toString is in error.

        Attachments

          Activity

            People

            Assignee:
            fyellinsunw Frank Yellin (Inactive)
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: