enhanced-metadata-spec-discuss Digest, Vol 13, Issue 6

Jesper Steen Møller jesper at selskabet.org
Thu Sep 26 13:49:20 PDT 2013


On 26/09/2013, at 21.35, Alex Buckley wrote:

> On 9/25/2013 8:06 PM, Srikanth S Adayapalam wrote:
>> Alex, could you please recheck if 9.6.3.6 is clear enough - Everytime
>> I read it, I get confused, I grant that it could just be me.
>> 
>> "The only time a deprecation warning can occur for a construct which
>> is implicitly declared is if a container annotation (§9.7.5) has a
>> containing annotation type which is deprecated."
>> 
>> Is this better worded as "... if a repeating (and repeatable)
>> annotation has a container annotation type which is deprecated" ?"
>> 
>> or "declared is for container annotations which are deprecated"
>> 
>> The present wording "container annotation (§9.7.5) has a containing
>> annotation type" seems to invoke images of container's container.
> 
> I see what you mean. I will spell it out:
> 
> "The only implicitly declared construct that can cause a deprecation warning is a container annotation (9.7.5). Namely, if T is a repeatable annotation type and TC is its containing annotation type, and TC is deprecated, then repeating the @T annotation will cause a deprecation warning. The warning is due to the implicit @TC container annotation. No warnings are required for the declarations of T and TC, though it is strongly discouraged to deprecate a containing annotation type without also deprecating the repeatable annotation type."
> 

Thanks for the clarification.
Nitpicking: The declaration of T would give a deprecation warning for the use of TC.class in @Repeatable(TC.class), but I guess this is unrelated to this clause.

By the way, javac b108 doesn't issue the use on repeated use of T, as in my original example. One for the compiler-dev list?

-Jesper


More information about the enhanced-metadata-spec-discuss mailing list