<i18n dev> RFR: 8313205: Modernize java.text.Format with StringBuilder [v2]
Justin Lu
jlu at openjdk.org
Thu Jul 25 23:45:08 UTC 2024
> Please review this PR which adds public StringBuilder overloads to the formatting methods of java.text.Format and implementing subclasses.
>
> While Format, NumberFormat, and DateFormat are abstract, these new methods are not added as abstract to prevent compatibility concerns. Instead they are added as non-abstract methods, with a default implementation that throws UOE and a recommendation that subclasses override and provide their own implementations. These new methods use the same specification as the StringBuffer ones, with exception of `MessageFormat.format(format(Object[] arguments, StringBuilder result, FieldPosition pos)` which omits the table, and instead links to it.
>
> The JDK implementing Format classes, (such as DecimalFormat) leverage the StringBuf proxy methods.
>
> A corresponding CSR has been drafted: https://bugs.openjdk.org/browse/JDK-8337141, which goes into detail on motivation/history. (Holding off on uploading the specification to CSR until wording finalized).
Justin Lu has updated the pull request incrementally with one additional commit since the last revision:
add since tags
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/20337/files
- new: https://git.openjdk.org/jdk/pull/20337/files/3c78d9ac..314b8d7b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=20337&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=20337&range=00-01
Stats: 18 lines in 9 files changed: 18 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/20337.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/20337/head:pull/20337
PR: https://git.openjdk.org/jdk/pull/20337
More information about the i18n-dev
mailing list