On Thu, 25 Jul 2024 22:18:03 GMT, Justin Lu <j...@openjdk.org> wrote:
> 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). This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/20337