<i18n dev> RFR: 8299500: Usage of constructors of primitive wrapper classes should be avoided in java.text API docs

Naoto Sato naoto at openjdk.org
Fri Jan 6 18:39:59 UTC 2023


On Fri, 6 Jan 2023 17:42:53 GMT, Justin Lu <duke at openjdk.org> wrote:

> Removed constructors of primitive wrapper classes (deprecated for removal) for the following
> - _java.text.ChoiceFormat_
> - _java.text.MessageFormat_ 
> 
> Replaced with .valueOf() method

LGTM

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

> 311:  * String result = mf.format( objs );
> 312:  * // result now equals "3.14, 3.1"
> 313:  * objs = null;

Although this is not related to this fix, this line `objs = null` is not needed (and is confusing as an example snippet). I'd remove this.

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

Marked as reviewed by naoto (Reviewer).

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


More information about the i18n-dev mailing list