On Fri, 24 May 2024 11:30:19 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 merg
> 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].
>
> [Implicitl
On Thu, 23 May 2024 17:14:19 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 merg
On Thu, 23 May 2024 17:14:19 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 merg
> 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].
>
> [Implicitl
> 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].
>
> [Implicitl
> 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].
>
> [Implicitl
On Tue, 21 May 2024 21:16:52 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 78:
>>
>>> 76: String line = null;
>>> 77: synchronized (writeLock) {
>>> 78: synchronized(readLock) {
>>
>> Suggestion:
>>
>> sy
On Tue, 21 May 2024 19:55:22 GMT, Andrey Turbanov wrote:
>> 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
On Tue, 21 May 2024 15:44:18 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 merg
> 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].
>
> [Implicitl
On Tue, 14 May 2024 14:31:52 GMT, Pavel Rappo wrote:
>> 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 here? Maybe that is to
On Mon, 13 May 2024 09:56:35 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 merg
On Tue, 14 May 2024 14:27:35 GMT, Per Minborg wrote:
>> 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 sin
On Mon, 13 May 2024 09:56:35 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 merg
On Mon, 13 May 2024 09:56:35 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 merg
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
>>
>> - it
On Mon, 13 May 2024 09:56:35 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 merg
> 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].
>
> [Implicitl
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
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.
>
> src/jav
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.
>
> src/java
> 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].
>
> [Implicitl
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
>> instantiation
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 merge
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 onl
On Wed, 8 May 2024 18:43:41 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 merge
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 merge
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 merge
> 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].
>
> [Implicitl
> 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].
>
> [Implicitl
On Thu, 9 May 2024 14:41:13 GMT, Jonathan Gibbons wrote:
> (Minor). at least within the context of this PR, tags like `@param` and
> `@throws` are stylistically inconsistent as to whether they begin with a
> capital letter and end with a period. (I have not checked for local
> consistency with
On Thu, 9 May 2024 14:23:37 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 merge
> 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].
>
> [Implicitl
On Wed, 8 May 2024 19:40:44 GMT, Stuart Marks wrote:
>>> Most of these are defined in terms of `String.valueOf(Object)` which if
>>> passed a null reference will return the String object containing `null`. So
>>> no, I don't think NPE should be thrown. It might be worth mentioning this
>>> exp
On Wed, 8 May 2024 18:25:50 GMT, Pavel Rappo wrote:
>> Most of these are defined in terms of `String.valueOf(Object)` which if
>> passed a null reference will return the String object containing `null`. So
>> no, I don't think NPE should be thrown. It might be worth mentioning this
>> explicit
> 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].
>
> [Implicitl
On Wed, 8 May 2024 16:06:29 GMT, Stuart Marks wrote:
> Most of these are defined in terms of `String.valueOf(Object)` which if
> passed a null reference will return the String object containing `null`. So
> no, I don't think NPE should be thrown. It might be worth mentioning this
> explicitly
I don't remember it being considered, but I think it falls outside the scope of
JEP 477 (emphasis mine):
> We achieve this effect by declaring a new top-level class in the java.io
> package named, simply, IO. It declares the above three static methods for
> **textual** I/O with the console, and
On Wed, 8 May 2024 09:39:13 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/java/io/Console.java line 151:
>>
>>> 149: /**
>>> 150: * Writes a string representation of the specified object to this
>>> console's
>>> 151: * output stream, terminates the line and then flushes
On Wed, 8 May 2024 13:13:33 GMT, Pavel Rappo wrote:
>> I haven't given it a try, but a brief look at the code suggests that if the
>> console implementation backed by JLine gets used, then a `null` prompt may
>> not generate a `NullPointerException` (since JLine appears to allow `null`)
>> whe
Has it been considered to add a readKey() method to IO class? In my
experience, it is pretty commonly used by beginners when they write things
like console games (snake, catcher game etc.). I am aware there is
System.in.read() method, but since we decided to promote some methods to
separate methods
On Wed, 8 May 2024 10:31:59 GMT, Jaikiran Pai wrote:
>> If we specify that, it would be very much unlike all other `Console` methods
>> that are covered by this:
>>
>> * Unless otherwise specified, passing a {@code null} argument to any
>> method
>> * in this class will cause a {@link
On Wed, 8 May 2024 08:59:18 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/java/io/Console.java line 192:
>>
>>> 190: *
>>> 191: * @param prompt
>>> 192: * A prompt string.
>>
>> Hello Pavel, should this specify whether `prompt` can be null?
>
> If we specify th
On Wed, 8 May 2024 05:53:25 GMT, Jaikiran Pai wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Strengthen tests after 8330998
>>
>> https://github.com/openjdk/jdk/pull/18996 now allows us to test
>> Console IO
On Wed, 8 May 2024 05:59:14 GMT, Jaikiran Pai wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Strengthen tests after 8330998
>>
>> https://github.com/openjdk/jdk/pull/18996 now allows us to test
>> Console IO
On Wed, 8 May 2024 05:41:52 GMT, Jaikiran Pai wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Strengthen tests after 8330998
>>
>> https://github.com/openjdk/jdk/pull/18996 now allows us to test
>> Console IO
On Tue, 7 May 2024 19:46:18 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 merge
On Tue, 7 May 2024 19:46:18 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 merge
On Wed, 8 May 2024 05:45:55 GMT, Jaikiran Pai wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Strengthen tests after 8330998
>>
>> https://github.com/openjdk/jdk/pull/18996 now allows us to test
>> Console IO
On Tue, 7 May 2024 19:46:18 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 merge
On Tue, 7 May 2024 19:46:18 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 merge
On Tue, 7 May 2024 22:12:55 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/java/io/IO.java line 37:
>>
>>> 35: * is {@code null}; otherwise, the effect is as if a similarly-named
>>> method
>>> 36: * had been called on that console.
>>> 37: *
>>
>> Add a note here on encoding (chara
On Tue, 7 May 2024 21:19:59 GMT, Stuart Marks wrote:
>> Pavel Rappo has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Strengthen tests after 8330998
>>
>> https://github.com/openjdk/jdk/pull/18996 now allows us to test
>> Console IO
On Tue, 7 May 2024 19:46:18 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 merge
On Tue, 7 May 2024 02:54:39 GMT, Joe Darcy wrote:
>> src/java.base/share/classes/java/io/IO.java line 41:
>>
>>> 39: */
>>> 40: @PreviewFeature(feature = PreviewFeature.Feature.IMPLICIT_CLASSES)
>>> 41: public class IO {
>>
>> Should this be final?
>
>> Should this be final?
>
> With only the
On Tue, 7 May 2024 16:09:08 GMT, Pavel Rappo wrote:
>> I do not think the step to "standardise" a preview feature exists ? When a
>> preview feature becomes a released feature, the code is very lightly edited,
>> at least it this is my experience.
>>
>> You can change both readln and readLine
On Tue, 7 May 2024 17:37:57 GMT, Pavel Rappo wrote:
> Yes, we do. There's a common misconception that `{@inheritDoc}` inherits the
> complete doc comment. In reality, `{@inheritDoc}` inherits only the main
> description, which does not include any `@throws` tags.
>
> A `@throws` tag is either
> 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].
>
> [Implicitl
> 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].
>
> [Implicitl
On Tue, 7 May 2024 17:30:46 GMT, Naoto Sato wrote:
> Sorry, I read it wrong. Your comment is clear so no need for rewording
Still, I think that your misreading is a symptom of a problem with my wording.
Let me try to rephrase it; let's see if you like it more.
-
PR Review Comment:
On Tue, 7 May 2024 16:24:52 GMT, Naoto Sato 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
On Tue, 7 May 2024 17:15:43 GMT, Pavel Rappo wrote:
>> test/jdk/java/io/IO/IO.java line 99:
>>
>>> 97: System.getProperty("test.jdk") + "/bin/java",
>>> 98: "--enable-preview",
>>> 99: "-Djdk.console=gibberish",
>>
>> The test comment suggests thi
On Tue, 7 May 2024 16:32:46 GMT, Naoto Sato 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
On Tue, 7 May 2024 01:20:39 GMT, Naoto Sato 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
On Mon, 6 May 2024 21:45:12 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 merge --sq
On Tue, 7 May 2024 12:17:36 GMT, Rémi Forax wrote:
> I do not think the step to "standardise" a preview feature exists ? When a
> preview feature becomes a released feature, the code is very lightly edited,
> at least it this is my experience.
We may call it differently, but I think both you a
On Tue, 7 May 2024 12:18:52 GMT, Rémi Forax wrote:
>> 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.
>
> yes, le
On Tue, 7 May 2024 11:00:52 GMT, Pavel Rappo wrote:
>> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 74:
>>
>>> 72:
>>> 73: @Override
>>> 74: public String readln(String prompt) {
>>
>> this code can be simplified using an early return (and the body of the
>> tr
On Tue, 7 May 2024 05:52:12 GMT, Rémi Forax 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
On Tue, 7 May 2024 05:49:58 GMT, Rémi Forax 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
On Mon, 6 May 2024 21:45:12 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 merge --sq
On Tue, 7 May 2024 01:26:30 GMT, Chen Liang 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.
-
PR Review Comment: https://git.openjdk.org/jdk/pull/19
On Mon, 6 May 2024 21:45:12 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 merge --sq
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 Classe
75 matches
Mail list logo