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

Misleading comment in source code for Boolean.toString

    XMLWordPrintable

Details

    • 1.1
    • sparc
    • solaris_1
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: