Use of an annotation without @Target meta-annotation on a module declaration

Alex Buckley alex.buckley at oracle.com
Tue Sep 24 23:52:03 UTC 2019


On 9/19/2019 8:32 PM, Michael Ernst wrote:
> * All contexts.
>    This is the simplest and clearest specification.  It is the most 
> intuitive and easiest to remember, and therefore least likely to lead to 
> problems.  Those qualities make it attractive.
>    It is a behavior change from the current specification, but a small 
> one that affects poorly-written programs that have no @Target 
> meta-annotation.
>    I propose that we adopt this meaning.

I completely agree with this approach. JLS and javac bugs filed:

   https://bugs.openjdk.java.net/browse/JDK-8231435
   https://bugs.openjdk.java.net/browse/JDK-8231436

Alex


More information about the compiler-dev mailing list