JDK 9 RFR of JDK-6469561,javadoc for annotation types should not display "public abstract" modifiers on methods
Jonathan Gibbons
jonathan.gibbons at oracle.com
Mon Feb 15 18:29:41 UTC 2016
I agree that you have matched the coding standards of the surrounding
code, and for that, the code gets an OK.
But, the code should (ideally) be just using the Language Model API to
determine whether a type is an annotation type or not, and so if we
don't change this now, we should file a follow-up fix-it ticket for the
javadoc team. There may be other instances of the anti-pattern in the
code that we should check for and fix.
-- Jon
On 02/15/2016 10:24 AM, joe darcy wrote:
> 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