RFR: 8353795: Add Writer.of(StringBuilder) [v2]
Markus KARG
duke at openjdk.org
Tue May 6 20:32:17 UTC 2025
On Sun, 4 May 2025 16:21:41 GMT, Markus KARG <duke at openjdk.org> wrote:
>> This Pull Requests proposes an implementation for [JDK-8353795](https://bugs.openjdk.org/browse/JDK-8353795): Adding the new method `public static Writer Writer.of(StringBuilder)`, providing a non-synchronized Writer implementation optimized for writing into `StringBuilder`.
>>
>> A basic test is provided to proof that the new `Writer` behaves as expected. For comparison, the same test is also run against `StringWriter`.
>
> Markus KARG has updated the pull request incrementally with two additional commits since the last revision:
>
> - Undone copyright update of otherwise unchanged file.
> - Update Of.java
>
> Applied changnes proposed by @liach: "the default toString already includes id=..., so I usually don't provide an explicit override to make the code concise."
> There is some wording around this topic in the guide already: _In order to prepare the community for your patch, please socialize your idea on the relevant [mailing lists](https://openjdk.org/guide/#mailing-lists). Almost all changes, and in particular any API changes, must go this route and have a broad agreement in place before there is any point in presenting code._
>
> I've added the suggested text to clarify this paragraph: [openjdk/guide#150](https://github.com/openjdk/guide/pull/150)
Then I can literally stop working on OpenJDK rather immediately, as people never find enough time for **"broad"** agreement. At least they didn't in the past **years**.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24469#issuecomment-2855892549
More information about the nio-dev
mailing list