RFR: 8330532: Improve line-oriented text parsing in HotSpot [v3]

Johan Sjölen jsjolen at openjdk.org
Wed Apr 24 09:45:32 UTC 2024


On Tue, 23 Apr 2024 18:34:23 GMT, John R Rose <jrose at openjdk.org> wrote:

>> Sometimes redundant comments are helpful.  I think this one is.  YMMV.
>
> The `override` keyword is nice; thank you.
> 
> I have already argued against the removal of `set_input`.  And `set_input` needs `close`.
> 
> I think `set_input` is not YAGNI but YIWNI = Yes I will need it.  The reply that “you can just wrap another i-stream around the new i-source” is fallacious because of the performance model of i-stream.

Sorry, I'm still not on board with the `close` operation and I'm against `set_input` calling `close()` :-). Why is it necessary for the `inputStream` to require a file to be re-opened if the `inputStream` switches from one file to another?

To be clear: OK, we want `set_input` because we don't want to allocate two small buffers, that's fine by me.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1577605487


More information about the hotspot-dev mailing list