JLS Creator production does not use 'Type'

Alex Buckley alex.buckley at oracle.com
Wed Apr 24 10:05:25 PDT 2013


On 4/23/2013 10:18 PM, Srikanth S Adayapalam wrote:
>> From: Alex Buckley <alex.buckley at oracle.com>
>> Subject: Re: JLS Creator production does not use 'Type'
>>
>> Mike, please respond to the mail below. The Creator production is not
>> the 308 spec from 4/1 and so annotations are not allowed after a 'new'
>> keyword, period. Accordingly, the current discussion on
>> jsr308-discuss at googlegroups.com is _wrong_ to assume the following is
> legal:
>>
>> Object o = new @A String[1];
>> Object o = new String @A[1];
>
> Hi Alex,
>
> This passage above makes for confusing reading for me. Could you please
> clarify: Are you saying the spec as it stands does not allow these and
> so asking Mike to fix the spec, or are you saying that the code snippet
> above is illegal ?

The former. The Creator production does not use Type so is unaffected by 
the modification of Type in JSR 308 2.2 to allow annotations. This 
obviously needs addressing in 2.2.

Alex


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