<Sound Dev> RFR: 8271456: Avoid looking up standard charsets in "java.desktop" module [v2]
Sergey Bylokhov
serb at openjdk.java.net
Tue Aug 3 19:37:04 UTC 2021
> 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.StandardCharsets:
> absolutePath.getBytes(StandardCharsets.UTF_8);
>
> The later variant also makes the code cleaner, as it is known not to throw UnsupportedEncodingException in contrary to the former variant.
>
> Tested by the desktop headless/headful tests on linux/windows.
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 commits since the last revision:
- Merge branch 'master' into JDK-8271456
- Initial fix for JDK-8271456
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/4951/files
- new: https://git.openjdk.java.net/jdk/pull/4951/files/430c9b3a..886264aa
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4951&range=01
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4951&range=00-01
Stats: 1774 lines in 83 files changed: 1230 ins; 337 del; 207 mod
Patch: https://git.openjdk.java.net/jdk/pull/4951.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/4951/head:pull/4951
PR: https://git.openjdk.java.net/jdk/pull/4951
More information about the sound-dev
mailing list