On Tue, 28 Mar 2023 21:51:21 GMT, Roger Riggs <rri...@openjdk.org> wrote:

>> Mandy Chung has updated the pull request incrementally with two additional 
>> commits since the last revision:
>> 
>>  - move ClassFileDumper to jdk.internal.util
>>  - rename the system property for dumping class files
>
> src/java.base/share/classes/jdk/internal/util/ClassFileDumper.java line 209:
> 
>> 207:         final int len = className.length();
>> 208:         StringBuilder sb = new StringBuilder(len);
>> 209: 
> 
> This could be fewer lines of adhoc conversions, the replacements are hex 
> encoding of the characters, so the replacement array is not needed. 
> java.util.HexFormat should be used for the hex encoding. The `formatHex` 
> methods append to a StringBuilder.

This old code was from ProxyClassesDumper.  Yes it can be converted to use 
HexFormat.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13182#discussion_r1151200144

Reply via email to