RFR: 8305457: Implement java.io.IO
Pavel Rappo
prappo at openjdk.org
Tue May 7 11:16:55 UTC 2024
On Tue, 7 May 2024 05:52:12 GMT, Rémi Forax <forax at openjdk.org> wrote:
>> Please review this PR which introduces the `java.io.IO` top-level class and three methods to `java.io.Console` for [Implicitly Declared Classes and Instance Main Methods (Third Preview)].
>>
>> This PR has been obtained as `git merge --squash` of a now obsolete [draft PR].
>>
>> [Implicitly Declared Classes and Instance Main Methods (Third Preview)]: https://bugs.openjdk.org/browse/JDK-8323335
>> [draft PR]: https://github.com/openjdk/jdk/pull/18921
>
> src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java line 88:
>
>> 86: @Override
>> 87: public JdkConsole println(Object obj) {
>> 88: writer().println(obj);
>
> the result of 'writer()' can be stored in a local variable (printing code are not JITed as often as the rest of the codes)
I assume it's about performance. If so, I would defer any performance-related tweaks until they are necessary. Interactive reading from console does not sound like something requiring that level of performance tweaking.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19112#discussion_r1592303463
More information about the core-libs-dev
mailing list