RFR: JDK-8250741: an annotation interface may not be declared as a local interface
Jan Lahoda
jan.lahoda at oracle.com
Thu Jul 30 15:02:05 UTC 2020
Hi Vicente,
I've added myself as a reviewer on the CSR, and tried to tweak it a
little - but feel free to do any changes necessary.
For the patch, it overall looks good, two suggestions though:
-in Check.java, I'd suggest to use && instead of & for the boolean
operator (as it seems cleaner to me
-it seems to me there is no test that explicitly verifies the updated
behavior. It would be nice to have one - possibly as simple as
keeping/adjusting:
* @compile/fail/ref=IllegalAnnotation.out -XDrawDiagnostics
--enable-preview -source ${jdk.version} IllegalAnnotation.java
in IllegalAnnotation.java.
Thanks,
Jan
On 29. 07. 20 21:08, Vicente Romero wrote:
> Please review at [1] the fix for [2] with corresponding CSR at [3]. The
> spec for Local Static Interfaces and Enum Classes [4] states that:
>
> |An annotation interface (9.6) may not be declared as a local interface|
>
> javac is accepting local annotations though. This fix is closing that
> gap between the compiler and the spec,
>
> Thanks,
> Vicente
>
> [1] http://cr.openjdk.java.net/~vromero/8250741/webrev.00
> [2] Bug: https://bugs.openjdk.java.net/browse/JDK-8250741
> [3] CSR: https://bugs.openjdk.java.net/browse/JDK-8250790
> [4]
> https://cr.openjdk.java.net/~gbierman/jep384/jep384-20200506/specs/local-statics-jls.html#jls-14.3
More information about the compiler-dev
mailing list