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

2024-05-21 Thread Andrey Turbanov
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:
>> 
>> synchronized (readLock) {
>
> Sorry, but no. It would be inconsistent with the rest of the file, which for 
> whatever reason (copy-paste?) does not use whitespace between `synchronized` 
> and `(readLock)`.

It looks strange to have space in one case, and don't have it in another. I 
would'nt call it consistent.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/19112#discussion_r1609287823


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

2024-05-21 Thread Pavel Rappo
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 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) {

Sorry, but no. It would be inconsistent with the rest of the file, which for 
whatever reason (copy-paste?) does not use whitespace between `synchronized` 
and `(readLock)`.

-

PR Review Comment: https://git.openjdk.org/jdk/pull/19112#discussion_r1608962852


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

2024-05-21 Thread Andrey Turbanov
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 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


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

2024-05-21 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].
> 
> [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

-

Changes: https://git.openjdk.org/jdk/pull/19112/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk=19112=09
  Stats: 692 lines in 13 files changed: 692 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/19112.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19112/head:pull/19112

PR: https://git.openjdk.org/jdk/pull/19112