On Thu, 10 Feb 2022 14:56:46 GMT, Sam Brannen <d...@openjdk.java.net> wrote:

>> Joe Darcy has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Respond to review feedback.
>
> 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.

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

PR: https://git.openjdk.java.net/jdk/pull/7418

Reply via email to