RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v26]

Jaikiran Pai jpai at openjdk.org
Wed May 28 15:46:05 UTC 2025


On Wed, 28 May 2025 15:23:58 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

>> test/jdk/java/io/Reader/ReadAll.java line 54:
>> 
>>> 52: public class ReadAll {
>>> 53:     private static final String PHRASE =
>>> 54:         "Ange plein de gaieté, connaissez-vous l'angoisse";
>> 
>> Would it be useful to have this (or some other) phrase contain some newline characters and also some whitespaces between a pair of newline characters? That then can exercise the case where the input being read by a `Reader` would consist of empty lines and lines with just whitespace characters. The way the inputs lines are constructed in `setup()`, it's possible that even in current form that scenario might get exercised but it's hard to be sure given the `Random` nature of that content generation.
>
> Thanks for the suggestion. I was thinking of another enhancement of the test anyway and can include this idea later in another request.

That sounds fine to me.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2112224033


More information about the core-libs-dev mailing list