8313205: Modernize java.text.Format with StringBuilder#20337
8313205: Modernize java.text.Format with StringBuilder#20337justin-curtis-lu wants to merge 4 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back jlu! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@justin-curtis-lu The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
|
You should add |
Thanks for the reminder. Updated. |
|
@justin-curtis-lu This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
|
@justin-curtis-lu This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
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).
Progress
Issues
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20337/head:pull/20337$ git checkout pull/20337Update a local copy of the PR:
$ git checkout pull/20337$ git pull https://git.openjdk.org/jdk.git pull/20337/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20337View PR using the GUI difftool:
$ git pr show -t 20337Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20337.diff
Webrev
Link to Webrev Comment