RFR: 8305457: Implement java.io.IO [v7]
Jaikiran Pai
jpai at openjdk.org
Fri May 10 07:48:04 UTC 2024
On Thu, 9 May 2024 18:27:08 GMT, Pavel Rappo <prappo 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
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix System.console().readln(null) in jshell
>
> Without it, jshell hangs on me. Will think of a test.
src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 61:
> 59: @Override
> 60: public JdkConsole println(Object obj) {
> 61: pw.println(obj);
Are these `println(...)` and `print(...)` methods intentionally not using a `writeLock` unlike the `readln(...)` and `readLine(...)` methods which do use (read and write) locks?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19112#discussion_r1596392802
More information about the core-libs-dev
mailing list