RFR: 8298971: Move Console implementation into jdk internal package [v2]

Naoto Sato naoto at openjdk.org
Wed Dec 21 02:30:22 UTC 2022


On Wed, 21 Dec 2022 00:33:09 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Removed JdkConsoleProviderImpl, caching INSTANCE
>
> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 166:
> 
>> 164:     @Override
>> 165:     public Charset charset() {
>> 166:         assert charset != null : "charset() should not return null";
> 
> Maybe we could add a `Objects.requireNonNull(charset)` in the constructor of this `JdkConsoleImpl` and remove this `assert`, since `charset` is `final`?

Good point. Replaced `assert` with `Objects.requireNonNull(charset)`

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

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


More information about the core-libs-dev mailing list