RFR: 8274544: Langtools command's usage were garbled on Japanese Windows [v2]
Ichiroh Takiguchi
itakiguchi at openjdk.java.net
Wed Oct 6 05:09:08 UTC 2021
On Mon, 4 Oct 2021 16:24:18 GMT, Naoto Sato <naoto at openjdk.org> wrote:
>> Ichiroh Takiguchi has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8274544: Langtools command's usage were garbled on Japanese Windows
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java line 265:
>
>> 263: * @return a map of writers
>> 264: */
>> 265: private final static Charset nativeCharset;
>
> Inserting this static initializer in the middle of a method, between its javadoc and impl, is odd.
Moved to another place
> src/jdk.compiler/share/classes/com/sun/tools/javac/util/Log.java line 267:
>
>> 265: private final static Charset nativeCharset;
>> 266: static {
>> 267: Charset cs = Charset.defaultCharset();
>
> This could move into the `catch` section as a last resort.
Move `cs = Charset.defaultCharset()` into `catch` section
> src/jdk.jdeps/share/classes/com/sun/tools/javap/JavapTask.java line 419:
>
>> 417: return new PrintWriter(System.err, true, nativeCharset);
>> 418: } else {
>> 419: if (s.equals((OutputStream)System.err) || s.equals((OutputStream)System.out)) {
>
> Can we use `==` here?
Used `==`
> src/jdk.jpackage/share/classes/jdk/jpackage/main/Main.java line 50:
>
>> 48: * @param args command line arguments
>> 49: */
>> 50: private final static Charset nativeCharset;
>
> Static initializer dissecting main method (javadoc/impl)
Moved to another place
-------------
PR: https://git.openjdk.java.net/jdk/pull/5771
More information about the core-libs-dev
mailing list