On Tue, 21 May 2024 15:44:18 GMT, Pavel Rappo <pra...@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 with a new target base due to a > merge or a rebase. The pull request now contains 20 commits: > > - Add diagnostic output > - Use "expect" that was found > - Merge branch 'master' into 8305457-Implement-java.io.IO > > # Conflicts: > # src/java.base/share/classes/java/io/ProxyingConsole.java > # src/java.base/share/classes/jdk/internal/io/JdkConsole.java > # src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java > # > src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java > # src/jdk.jshell/share/classes/jdk/jshell/execution/impl/ConsoleImpl.java > - Escape prompt > - Merge branch 'master' into 8305457-Implement-java.io.IO > - Clarify input charset > - Make IO final > - Fix System.console().readln(null) in jshell > > Without it, jshell hangs on me. Will think of a test. > - Fix typo > - Merge branch 'master' into 8305457-Implement-java.io.IO > - ... and 10 more: https://git.openjdk.org/jdk/compare/b92bd671...809e98e0 src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 78: > 76: String line = null; > 77: synchronized (writeLock) { > 78: synchronized(readLock) { Suggestion: synchronized (readLock) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19112#discussion_r1608882590