On Mon, 13 May 2024 09:56:35 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 incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains 17 additional > commits since the last revision: > > - 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 > - Simplify output.exp > - Cover null prompt in input tests > - Make input test parametric > - ... and 7 more: https://git.openjdk.org/jdk/compare/2f44ac18...17100ab8 src/java.base/share/classes/java/io/IO.java line 98: > 96: * or if an I/O error occurs > 97: */ > 98: public static String readln(String prompt) { Did we consider Optional<String> here? Maybe that is to complicated for an onramp? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19112#discussion_r1600145844