RFR [15] 8238467: Clean up annotations on overridden/implemented methods

Pavel Rappo pavel.rappo at oracle.com
Tue Feb 4 21:39:30 UTC 2020


> On 4 Feb 2020, at 19:40, Jonathan Gibbons <jonathan.gibbons at oracle.com> wrote:
> 
> Approved.  Thanks for doing this. It may cause some short term conflicts,
> but is otherwise worthwhile.
> 
> You deleted comments containing @throws in a few places, but it seems like
> nothing significant was added, so OK.

Thanks for reviewing this rather monotonous changeset! I checked the patch one
more time and found 3 instances of the above.

1.  jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build
    jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.build

      @throws DocletException if there is a problem while building the documentation
      @throws DocletException if there is a problem       building the documentation

    (insignificant)

2.  jdk.javadoc.internal.doclets.toolkit.taglets.BaseTaglet#getTagletOutput(2 parameters)
    jdk.javadoc.internal.doclets.toolkit.taglets.Taglet.getTagletOutput(2 parameters)

      @throws UnsupportedTagletOperationException thrown when the method is not supported by the taglet.
      @throws UnsupportedTagletOperationException thrown when the method is not supported by the taglet.

    (identical)

3.  jdk.javadoc.internal.doclets.toolkit.taglets.BaseTaglet#getTagletOutput(3 parameters)
    jdk.javadoc.internal.doclets.toolkit.taglets.Taglet#getTagletOutput(3 parameters)

      @throws UnsupportedOperationException       thrown when the method is not supported by the taglet.
      @throws UnsupportedTagletOperationException thrown when the method is not supported by the taglet.

The exceptions are different (one is a subtype of the other). However, I doubt
that this is significant (here) or that this reflects a conscious design decision.
However, I agree I should've disclosed that in my RFR.

-Pavel

> 
> -- Jon
> 
> 
> On 2/4/20 5:21 AM, Pavel Rappo wrote:
>> Hello,
>> 
>> Please review the change for https://bugs.openjdk.java.net/browse/JDK-8238467:
>> 
>>   http://cr.openjdk.java.net/~prappo/8238467/webrev.00/
>> 
>> This is a blanket cleanup. The change adds missing @java.lang.Override annotations
>> and removes some of the {@inheritDoc} tags. The removed {@inheritDoc} tags are
>> either redundant or misplaced. Redundant {@inheritDoc} tags provide explicit
>> comment inheritance, otherwise having no value. Misplaced {@inheritDoc} tags
>> are used on inapplicable entities, e.g. non-inheriting, non-implementing, static,
>> private methods, etc.
>> 
>> Added @Override annotations provide compile-time checking and serve as visual
>> cues to the reader. Removed {@inheritDoc} tags make the source code swell and
>> sometimes confuse the reader.
>> 
>> Thanks,
>> -Pavel
>> 



More information about the javadoc-dev mailing list