On Thu, 10 Feb 2022 22:09:16 GMT, Joe Darcy <da...@openjdk.org> wrote:
>> src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java >> line 256: >> >>> 254: return Objects.toString(finalComponent.getCanonicalName(), >>> 255: "<no canonical name>") + >>> 256: arrayBrackets.toString() + ".class"; >> >> Since we're using the canonical name now (which takes the array brackets >> into account), can't the whole method be simplified down to the following? >> >> Suggestion: >> >> return Objects.toString(clazz.getCanonicalName(), "<no canonical >> name>") + ".class"; > > The getCanonicalName is not specified to behave that way, should be a RFE I > suppose, but appears to in practice; changed as suggested in subsequent push. > Thanks. Thanks, Joe. Regarding the RFE, do you plan to open an issue to address the documentation for `getCanonicalName`? ------------- PR: https://git.openjdk.java.net/jdk/pull/7418