RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v19]
Markus KARG
duke at openjdk.org
Fri May 16 16:02:56 UTC 2025
On Thu, 15 May 2025 22:07:05 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> It is **impossible** to "invest some lines" to solve this in JAX-RS, and JAX-RS as a standard technology on tens of thousands of servers. Enforcing `String` prevents these useful optimizations, but brings *no actual benefit*, as *only few* callers actually care for *constant* objects, but would be satisfied with `CharSequence`'s lack of mutation methods.
>
>> Also, in JAX-RS for example, you cannot make use of `transferTo` as what you get is a heap object, and what you must forward also is a heap object.
>
> What relation does such a "heap object" have to character streams?
With "heap object" I meant something that is kept on the Java heap, like a `CharSequence` or `String`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2093313964
More information about the core-libs-dev
mailing list