On Fri, 11 Feb 2022 15:24:45 GMT, Sam Brannen 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
>
On Thu, 10 Feb 2022 22:12:57 GMT, Joe Darcy wrote:
>> Two changes to the toString output for annotations to give better source
>> fidelity:
>>
>> 1) For enum constants, call their name method rather than their toString
>> method. An enum class can override the toString method to print
On Thu, 10 Feb 2022 22:09:16 GMT, Joe Darcy wrote:
>> src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java
>> line 256:
>>
>>> 254: return Objects.toString(finalComponent.getCanonicalName(),
>>> 255: "") +
>>> 256:
On Thu, 10 Feb 2022 22:12:57 GMT, Joe Darcy wrote:
>> Two changes to the toString output for annotations to give better source
>> fidelity:
>>
>> 1) For enum constants, call their name method rather than their toString
>> method. An enum class can override the toString method to print
On Thu, 10 Feb 2022 22:08:27 GMT, Joe Darcy wrote:
>> src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java
>> line 197:
>>
>>> 195: // Predicate above covers enum constants, including
>>> 196: // those with specialized class
On Thu, 10 Feb 2022 14:04:01 GMT, Jaikiran Pai wrote:
> Hello Joe, would it be better to use the new syntax for `instanceof` here to
> avoid the subsequent cast?
>
> ```
> else if (value instanceof Enum v)
>
> return toSourceString(v);
> ```
Fair point; updated in subsequent push.
On Thu, 10 Feb 2022 14:56:46 GMT, Sam Brannen 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
>
> Two changes to the toString output for annotations to give better source
> fidelity:
>
> 1) For enum constants, call their name method rather than their toString
> method. An enum class can override the toString method to print something
> other than the name.
>
> 2) Switch from using