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

Ioi Lam iklam at openjdk.org
Tue May 23 06:52:51 UTC 2023


On Tue, 23 May 2023 06:13:04 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> I've reimplemented using fgets().
>
> So now this is not just a refactoring it is a re-implementation, so now I have to try and understand the reading logic and can't just treat it as known good code. :(

I can revert to the getc version and implement the fgets version in a separate RFE. I agree that keeping the logic unchanged in refactoring will make things more manageable.

getc is buffered I/O, so there shouldn't be much difference in performance when compared to fgets. And the code affected by this PR doesn't care too much about I/O performance.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14025#discussion_r1201620296


More information about the hotspot-dev mailing list