java.text.MessageFormat has incorrect doc comment

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 21
    • Affects Version/s: None
    • Component/s: core-libs
    • b06

      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.

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

              Created:
              Updated:
              Resolved: