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

java.text.MessageFormat has incorrect doc comment

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 21
    • core-libs
    • b06

    Description

      In the Usage Information of java.text.MessageFormat, there is a comment in the example source code with the wrong variable name.

      * MessageFormat mf = new MessageFormat("{0}, {0}, {0}");
       * String forParsing = "x, y, z";
       * Object[] objs = mf.parse(forParsing, new ParsePosition(0));
       * // result now equals {new String("z")}

      The comment should be targeted at objs, not result.

      Attachments

        Issue Links

          Activity

            People

              jlu Justin Lu
              jlu Justin Lu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: