On Fri, 22 Oct 2021 04:54:35 GMT, Glavo wrote:
>> Naoto Sato has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Moved the null sentence into @param tag.
>
> Oh, I found that I checked the outdated source code. Now this problem does
> not
On Fri, 22 Oct 2021 02:07:44 GMT, Sergey Bylokhov wrote:
>> I first thought of swallowing all exceptions in 2-arg forName(), but decided
>> not to do that. Because `IllegalArgumentException` and
>> `IllegalCharsetNameException` are for the validity of the passed
>> `charsetName`, like
On Wed, 20 Oct 2021 19:02:30 GMT, Naoto Sato wrote:
>> During the review of JEP 400, a proposal to provide an overloaded method to
>> `Charset.forName()` was suggested
>> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
>> PR is to implement the proposal. A CSR is
On Wed, 20 Oct 2021 19:02:30 GMT, Naoto Sato wrote:
>> During the review of JEP 400, a proposal to provide an overloaded method to
>> `Charset.forName()` was suggested
>> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
>> PR is to implement the proposal. A CSR is
On Thu, 21 Oct 2021 16:03:29 GMT, Naoto Sato wrote:
>> Apparently `IllegalCharsetNameException` or `IllegalArgumentException` could
>> still be thrown - so removing the `try-catch` would be a change of behaviour
>> in those cases. It all depends on whether there is a chance that these
>>
On Thu, 21 Oct 2021 18:00:46 GMT, Naoto Sato wrote:
>> I'm not reviewer.
>>
>> I'd like to write down following code without `try-catch`.
>>
>> var cs = Charset.forName(charsetName, null);
>> if (cs == null) cs = StandardCharsets.UTF_8;
>>
>> or please find out more easy way.
>
>> I'd like to
On Thu, 21 Oct 2021 16:06:31 GMT, Ichiroh Takiguchi
wrote:
> I'd like to write down following code without `try-catch`.
You don't *have to* try-catch those exceptions if you are not interested, as
they are subclasses of `RuntimeException`.
> ```
> var cs = Charset.forName(charsetName, null);
On Wed, 20 Oct 2021 19:02:30 GMT, Naoto Sato wrote:
>> During the review of JEP 400, a proposal to provide an overloaded method to
>> `Charset.forName()` was suggested
>> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
>> PR is to implement the proposal. A CSR is
On Thu, 21 Oct 2021 09:33:30 GMT, Daniel Fuchs wrote:
>> Right, I think both try-catch usages will be removed.
>
> Apparently `IllegalCharsetNameException` or `IllegalArgumentException` could
> still be thrown - so removing the `try-catch` would be a change of behaviour
> in those cases. It
On Thu, 21 Oct 2021 15:00:03 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/io/Console.java line 594:
>>
>>> 592: cs = Charset.forName(StaticProperty.nativeEncoding(),
>>> Charset.defaultCharset());
>>> 593: } catch (Exception ignored) {
>>> 594:
On Thu, 21 Oct 2021 01:31:31 GMT, Sergey Bylokhov 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 594:
>
>> 592:
On Thu, 21 Oct 2021 06:50:41 GMT, Alan Bateman wrote:
>> 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
On Thu, 21 Oct 2021 01:30:05 GMT, Sergey Bylokhov 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:
On Wed, 20 Oct 2021 19:02:30 GMT, Naoto Sato wrote:
>> During the review of JEP 400, a proposal to provide an overloaded method to
>> `Charset.forName()` was suggested
>> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
>> PR is to implement the proposal. A CSR is
On Wed, 20 Oct 2021 19:02:30 GMT, Naoto Sato wrote:
>> During the review of JEP 400, a proposal to provide an overloaded method to
>> `Charset.forName()` was suggested
>> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
>> PR is to implement the proposal. A CSR is
On Wed, 20 Oct 2021 19:02:30 GMT, Naoto Sato wrote:
>> During the review of JEP 400, a proposal to provide an overloaded method to
>> `Charset.forName()` was suggested
>> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
>> PR is to implement the proposal. A CSR is
On Wed, 20 Oct 2021 18:58:34 GMT, Alan Bateman wrote:
>> Thanks, Joe. Moved that explanation into the `fallback` param, which I
>> initially intended.
>
> The java.nio.charset package has the usual "Unless otherwise noted, passing a
> null argument ..." so if fallback is allowed to be null
On Wed, 20 Oct 2021 18:37:05 GMT, Joe Wang 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:
On Wed, 20 Oct 2021 18:56:22 GMT, Naoto Sato wrote:
>> 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
> During the review of JEP 400, a proposal to provide an overloaded method to
> `Charset.forName()` was suggested
> [[1]](https://github.com/openjdk/jdk/pull/4733#discussion_r669693954). This
> PR is to implement the proposal. A CSR is also drafted as
>
20 matches
Mail list logo