<i18n dev> RFR: 8300093: Refactor code examples to use @snippet in java.text.MessageFormat

Naoto Sato naoto at openjdk.org
Tue Jan 17 19:27:45 UTC 2023


On Fri, 13 Jan 2023 21:47:40 GMT, Justin Lu <jlu at openjdk.org> wrote:

> This PR implements _JEP 413: Code Snippets in Java API Documentation_ for [java.text.MessageFormat](https://docs.oracle.com/en/java/javase/19/docs/api/java.base/java/text/class-use/MessageFormat.html).
> 
> Code examples using <pre> ... </pre> blocks are replaced with the @ snippet syntax where applicable.

Looks good. One minor nit (not related to your change).

src/java.base/share/classes/java/text/MessageFormat.java line 336:

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

I believe this `result` was meant for `objs`.

-------------

PR: https://git.openjdk.org/jdk/pull/12001


More information about the i18n-dev mailing list