JDK 9 RFR of JDK-6469561, javadoc for annotation types should not display "public abstract" modifiers on methods

joe darcy joe.darcy at oracle.com
Mon Feb 15 18:24:02 UTC 2016


Hi Jon,

I was replicating the coding patterns of the surrounding code. I'm not 
familiar with all the levels of indirection that may be in play here. In 
the standard setup, annotation types use a different writer than the 
other three kinds of types, classes, enum, and interfaces.

If the intention of the instance of checks to not unduly affect the 
behavior of other potential kinds of writers?

-Joe

On 2/14/2016 8:31 AM, Jonathan Gibbons wrote:
> Joe,
>
> The code looks OK, but I have to wonder why the code needs any tests 
> on the type of the Writer, and why it cannot do all the necessary 
> analysis on member and its enclosing element.
>
> -- Jon
>
>
> On 02/13/2016 06:18 PM, joe darcy wrote:
>> Hello,
>>
>> Please review the fix for
>>
>>      JDK-6469561,javadoc for annotation types should not display 
>> "public abstract" modifiers on methods
>>     http://cr.openjdk.java.net/~darcy/6469561.0/
>>
>> In brief, just as methods on interface types are implicitly public 
>> and abstract, so are methods on annotation types (technically 
>> annotation types are a special kind of interface type). While javadoc 
>> elides "public abstract" for methods on interfaces, it does not do so 
>> for methods on annotation type.
>>
>> The patch makes the behavior of javadoc consistent in this case.
>>
>> With the patch, all langtools regression tests pass and the modified 
>> test fails (as expected) if run against JDK 9 b104.
>>
>> Thanks,
>>
>> -Joe
>



More information about the compiler-dev mailing list