-
Enhancement
-
Resolution: Fixed
-
P4
-
11, 17
-
b10
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8339469 | 17.0.14-oracle | Alexey Ivanov | P4 | Resolved | Fixed | b01 |
JDK-8339596 | 17.0.14 | Goetz Lindenmaier | P4 | Resolved | Fixed | b01 |
JDK-8339489 | 11.0.26-oracle | Alexey Ivanov | P4 | Resolved | Fixed | b01 |
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 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.
In many places standard charsets are looked up via their names, for example:
absolutePath.getBytes("UTF-8");
This could be done more efficiently 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.
- backported by
-
JDK-8339469 Avoid looking up standard charsets in "java.desktop" module
-
- Resolved
-
-
JDK-8339489 Avoid looking up standard charsets in "java.desktop" module
-
- Resolved
-
-
JDK-8339596 Avoid looking up standard charsets in "java.desktop" module
-
- Resolved
-
- links to
-
Commit openjdk/jdk/6b55ef3b
-
Commit(master) openjdk/jdk17u-dev/58cbf5d0
-
Review openjdk/jdk/4951
-
Review(master) openjdk/jdk17u-dev/2844
(2 links to)