RFR: 8308252: Refactor line-by-line file reading code [v4]

Thomas Stuefe stuefe at openjdk.org
Tue May 23 09:43:04 UTC 2023


On Tue, 23 May 2023 03:40:26 GMT, Ioi Lam <iklam at openjdk.org> wrote:

>> I extracted the `get_line()` code from `CompileReplay` and put it in a utility class so that it can be used by `ClassListParser` as well. A few notable changes:
>> 
>> - Simplified the API
>> - Changed the buffer size to a size_t
>> - Added size overflow and OOM checks
>> - Brought over the `fdopen` logic from `ClassListParser` for handling long path names on Windows. (I don't know how valid this is nowadays, but I don't want to drop it in a refactoring PR).
>
> Ioi Lam has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - fixed new line
>  - @tstuefe and @dholmes-ora comments

Okay. Since the aim was to transfer the code as verbatim as possible without improving on it, this is fine.

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

Marked as reviewed by stuefe (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14025#pullrequestreview-1439106086


More information about the hotspot-dev mailing list