On Sat, 23 Oct 2021 22:13:35 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 al
On Tue, 26 Oct 2021 12:59:11 GMT, Naoto Sato wrote:
>> src/java.base/share/classes/java/io/Console.java line 590:
>>
>>> 588: if (cs == null) {
>>> 589: cs = Charset.forName(StaticProperty.nativeEncoding(),
>>> 590: Charset.defaultCharset());
>>
>> I assu
On Tue, 26 Oct 2021 10:42:49 GMT, Daniel Fuchs wrote:
>> Naoto Sato has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Reflecting review comments
>
> src/java.base/share/classes/java/io/Console.java line 590:
>
>> 588: if (cs == nu
On Sat, 23 Oct 2021 22:13:35 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 al
On Sat, 23 Oct 2021 22:13:35 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 al
On Sat, 23 Oct 2021 22:13:35 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 al
On Sat, 23 Oct 2021 22:13:35 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 al
On Sat, 23 Oct 2021 19:29:30 GMT, Sergey Bylokhov wrote:
> Just an idea, should we check that the second parameter is null or not? Any
> pros and cons of that? For example should this code be allowed:
>
> ```
> var cs = Charset.forName(charsetName, null);
> if (cs == null) {
>System.err.pri
> 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
> https://bugs.openjdk.java.net/browse/JDK-
On Sat, 23 Oct 2021 06:42:52 GMT, Alan Bateman wrote:
> I think you'll need to adjust the description make it clear that "fallback"
> is used when the input is not a legal charset name or the charset is not
> available.
Made the method description clearer.
-
PR: https://git.openj
On Fri, 22 Oct 2021 17:33:43 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 al
On Fri, 22 Oct 2021 17:33:43 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 al
On Fri, 22 Oct 2021 17:33:43 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 al
On Fri, 22 Oct 2021 17:33:43 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 al
On Fri, 22 Oct 2021 17:33:43 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 al
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 e
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 detectin
> 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
> https://bugs.openjdk.java.net/browse/JDK-
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 al
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 al
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
>> excep
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 al
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 all
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 which
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 al
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 al
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 al
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 then
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 not
> 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
> https://bugs.openjdk.java.net/browse/JDK-
On Wed, 20 Oct 2021 17:23:36 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 also d
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
https://bugs.openjdk.java.net/browse/JDK-8275348
-
38 matches
Mail list logo