On Thu, 4 Sep 2025 23:28:22 GMT, Stuart Marks <[email protected]> wrote:

>> Naoto Sato has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Refining comments
>
> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 133:
> 
>> 131:                         Charset.forName(StaticProperty.stdinEncoding(), 
>> UTF_8.INSTANCE),
>> 132:                         
>> Charset.forName(StaticProperty.stdoutEncoding(), UTF_8.INSTANCE))) :
>> 133:                 Optional.empty();
> 
> (Finally getting back to this.)
> 
> The code returns an Optional containing a JdkConsoleImpl instance, or an 
> empty Optional. However the comment above says it returns a JdkConsoleImpl 
> instance or null. Which do we want it to be? Either is OK, but the comment 
> should agree with the code.
> 
> I think @wangweij might want to weigh in here since his code will be calling 
> this.

Ah, yes. Comment does not align with the code. I am fine either way too.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26973#discussion_r2323752183

Reply via email to