RFR: 8270490: Charset.forName() taking fallback default value [v2]
Alan Bateman
alanb at openjdk.java.net
Thu Oct 21 06:54:07 UTC 2021
On Thu, 21 Oct 2021 01:30:05 GMT, Sergey Bylokhov <serb 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/io/Console.java line 587:
>
>> 585: try {
>> 586: cs = Charset.forName(csname, null);
>> 587: } catch (Exception ignored) { }
>
> The comment which suggests this enhancement was about eliminating such "exception ignored" code paths. Is it still needed here? And if it is needed why do we pass the null as a fallback?
Right, I think both try-catch usages will be removed.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6045
More information about the core-libs-dev
mailing list