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

David Holmes dholmes at openjdk.org
Wed May 24 05:59:07 UTC 2023


On Wed, 24 May 2023 04:49:20 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 one additional commit since the last revision:
> 
>   Avoid changing behavior in a refactoring PR - removed _max_buffer_length and reverted to getc()

Seems fine to me. Thanks for re-simplifying.

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

Marked as reviewed by dholmes (Reviewer).

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


More information about the hotspot-dev mailing list