Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v4]

2021-08-04 Thread Alexey Ivanov
On Tue, 3 Aug 2021 23:42:55 GMT, Sergey Bylokhov wrote: >> This is a request to clean up a desktop module as was done in JDK-8233884 >> for "java.base" module. >> >> In many places standard charsets are looked up via their names, for example: >> absolutePath.getBytes("UTF-8"); >> >> This could

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v4]

2021-08-03 Thread Sergey Bylokhov
> This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be done more efficiently(x20 time faster) with use of > java.ni

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Sergey Bylokhov
On Tue, 3 Aug 2021 22:42:55 GMT, Alexey Ivanov wrote: >> I am fine to do that, if there are no objections I can change the whole fix. > >> >> I am fine to do that, if there are no objections I can change the whole fix. > > Modifying the entire changeset seems like an overkill. > Using static im

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v3]

2021-08-03 Thread Sergey Bylokhov
> This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be done more efficiently(x20 time faster) with use of > java.ni

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Alexey Ivanov
On Tue, 3 Aug 2021 22:03:54 GMT, Sergey Bylokhov wrote: > > I am fine to do that, if there are no objections I can change the whole fix. Modifying the entire changeset seems like an overkill. Using static imports in only one file is _inconsistent_, yet it makes the places where the encodings a

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Sergey Bylokhov
On Tue, 3 Aug 2021 21:54:08 GMT, Alexey Ivanov wrote: >> it is aligned already, the StandardCharsets.UTF_8 is parameter of "new >> String()", not the getTransferData. > > Ah, right! > But it's confusing: it looks as if `StandardCharsets.UTF_8` is a parameter to > `getTransferData`. Maybe avoid

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Alexey Ivanov
On Tue, 3 Aug 2021 21:39:14 GMT, Sergey Bylokhov wrote: >> src/java.desktop/windows/classes/sun/awt/windows/WDataTransferer.java line >> 270: >> >>> 268: charset = new String((byte[])localeTransferable. >>> 269: getTransferData(javaTextEncodingFlavor)

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Sergey Bylokhov
On Tue, 3 Aug 2021 21:18:40 GMT, Alexey Ivanov wrote: >> Sergey Bylokhov has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains two additional >> commi

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Alexey Ivanov
On Tue, 3 Aug 2021 19:37:04 GMT, Sergey Bylokhov wrote: >> This is a request to clean up a desktop module as was done in JDK-8233884 >> for "java.base" module. >> >> In many places standard charsets are looked up via their names, for example: >> absolutePath.getBytes("UTF-8"); >> >> This could

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]

2021-08-03 Thread Sergey Bylokhov
> This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be done more efficiently(x20 time faster) with use of > java.ni

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module

2021-08-03 Thread Alexander Zvegintsev
On Sun, 1 Aug 2021 07:07:21 GMT, Sergey Bylokhov wrote: > This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be don

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module

2021-08-03 Thread Sergey Bylokhov
On Tue, 3 Aug 2021 13:30:28 GMT, Alexander Zvegintsev wrote: >> This is a request to clean up a desktop module as was done in JDK-8233884 >> for "java.base" module. >> >> In many places standard charsets are looked up via their names, for example: >> absolutePath.getBytes("UTF-8"); >> >> This

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module

2021-08-03 Thread Alexander Zvegintsev
On Sun, 1 Aug 2021 07:07:21 GMT, Sergey Bylokhov wrote: > This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be don

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module

2021-08-03 Thread Jayathirth D V
On Sun, 1 Aug 2021 07:07:21 GMT, Sergey Bylokhov wrote: > This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be don

Re: RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module

2021-08-02 Thread Сергей Цыпанов
On Sun, 1 Aug 2021 07:07:21 GMT, Sergey Bylokhov wrote: > This is a request to clean up a desktop module as was done in JDK-8233884 for > "java.base" module. > > In many places standard charsets are looked up via their names, for example: > absolutePath.getBytes("UTF-8"); > > This could be don

RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module

2021-08-01 Thread Sergey Bylokhov
This is a request to clean up a desktop module as was done in JDK-8233884 for "java.base" module. In many places standard charsets are looked up via their names, for example: absolutePath.getBytes("UTF-8"); This could be done more efficiently(x20 time faster) with use of java.nio.charset.Standa