On Mon, 12 Jun 2023 09:45:18 GMT, Chen Liang <[email protected]> wrote:
> Thanks to @exe-boss for the reviews in #13082. This cleanup patch fixed the
> typos you pointed out and removed other redundancies in classfile Util as
> well.
src/java.base/share/classes/jdk/internal/classfile/impl/Util.java line 90:
> 88: public static String toBinaryName(ClassDesc cd) {
> 89: return toInternalName(cd).replace('/', '.');
> 90: }
Note that this method is called with array class descriptors as well, so the
correct implementation would be:
Suggestion:
public static String toBinaryName(ClassDesc cd) {
return (cd.isArray() ? cd.descriptorString() : toInternalName(cd))
.replace('/', '.');
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14412#discussion_r1226461591