RFR: JDK-8250741: an annotation interface may not be declared as a local interface
Jan Lahoda
jan.lahoda at oracle.com
Fri Jul 31 16:03:18 UTC 2020
Looks OK to me.
Jan
On 30. 07. 20 21:46, Vicente Romero wrote:
> Hi Jan,
>
> Thanks for the review,
>
> On 7/30/20 11:02 AM, Jan Lahoda wrote:
>> 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.
>
> thanks looks good
>>
>> 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
>
> oops, sure
>
>> -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
>
> sure
>
>>
>> in IllegalAnnotation.java.
>>
>> Thanks,
>> Jan
>
> I have updated the webrev at [1]
>
> Thanks,
> Vicente
>
> [1] http://cr.openjdk.java.net/~vromero/8250741/webrev.01
>>
>> 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