RFR: JDK-8281462: Annotation toString output for enum not reusable for source input [v2]
Joe Darcy
darcy at openjdk.java.net
Thu Feb 10 22:12:57 UTC 2022
On Thu, 10 Feb 2022 14:04:01 GMT, Jaikiran Pai <jpai at openjdk.org> 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. Thanks.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7418
More information about the core-libs-dev
mailing list