Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-13 Thread Jaikiran Pai
On Fri, 10 May 2024 16:41:28 GMT, Naoto Sato wrote: >> When implementing, I asked myself if I must use any of those monitors and >> decided that I don't have to. My reasoning is below. >> >> `readLock`: >> >> - is used inside the object that `Reader reader` is initialised with, and >> >> -

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Naoto Sato
On Fri, 10 May 2024 14:54:10 GMT, Pavel Rappo wrote: >> 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

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Pavel Rappo
On Fri, 10 May 2024 07:45:02 GMT, Jaikiran Pai wrote: >> 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. > >

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Pavel Rappo
On Fri, 10 May 2024 07:23:38 GMT, Per Minborg wrote: >> 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. > >

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Pavel Rappo
On Fri, 10 May 2024 07:29:42 GMT, Per Minborg wrote: >> If the sole constructor of a class is private, not only does it preclude the >> class from being instantiated, but it also precludes the class from being >> extended. Mind you, even with the sole private constructor, both >>

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Jaikiran Pai
On Thu, 9 May 2024 18:27:08 GMT, Pavel Rappo 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

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Per Minborg
On Tue, 7 May 2024 20:23:11 GMT, Pavel Rappo wrote: >>> Should this be final? >> >> With only the private constructor, it doesn't matter too much in practice, >> but an explicit `final` would be good documentation if that is the intent. > > If the sole constructor of a class is private, not

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-10 Thread Per Minborg
On Thu, 9 May 2024 18:27:08 GMT, Pavel Rappo 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

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-09 Thread Stuart Marks
On Thu, 9 May 2024 18:27:08 GMT, Pavel Rappo 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

Re: RFR: 8305457: Implement java.io.IO [v7]

2024-05-09 Thread Pavel Rappo
> 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]. > >