Type annotations (JSR 308) specification draft

Srikanth S Adayapalam srikanth_sankaran at in.ibm.com
Wed Jan 23 23:29:03 PST 2013

JLS8 8.4 states:

For compatibility with older versions of the Java SE platform, the 
declaration of a
method that returns an array is allowed to place (some or all of) the 
empty bracket
pairs that form the declaration of the array type after the formal 
parameter list. This
is supported by the following obsolescent production, but should not be 
used in
new code.


Given that it could be argued that it does not make sense to allow for 
annotations to
be specified in the extra dimensions. Can we simply get rid of the changes 
in the
grammar for MethodDeclaratorRest and InterfaceMethodDeclaratorRest ?

Is there a compelling reason to support a discouraged construct ? It would 
our implementation a bit if we don't have to.


More information about the type-annotations-spec-experts mailing list