RFR: 8270490: Charset.forName() taking fallback default value [v2]
Naoto Sato
naoto at openjdk.java.net
Wed Oct 20 19:02:31 UTC 2021
On Wed, 20 Oct 2021 18:37:05 GMT, Joe Wang <joehw at openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Moved the null sentence into @param tag.
>
> src/java.base/share/classes/java/nio/charset/Charset.java line 545:
>
>> 543: * @return A charset object for the named charset, or {@code fallback}
>> 544: * in case the charset object for the named charset is not
>> 545: * available. May be {@code null}
>
> A minor comment: it seems to me returning the fallback charset is sufficient, and "May be null" may be not necessary since the fallback charset is provided, it's expected if it's null.
Thanks, Joe. Moved that explanation into the `fallback` param, which I initially intended.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6045
More information about the nio-dev
mailing list