On Wed, 21 Dec 2022 00:33:09 GMT, Jaikiran Pai <j...@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