commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: [lang] @inheritDoc
Date Fri, 08 Apr 2011 05:36:15 GMT
I'm +1 to keep @inheritDoc, for me it's like @Override
Simo

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Fri, Apr 8, 2011 at 1:58 AM, sebb <sebbaz@gmail.com> wrote:
> On 8 April 2011 00:09, Jörg Schaible <joerg.schaible@gmx.de> wrote:
>> Matt Benson wrote:
>>
>>> On Thu, Apr 7, 2011 at 5:02 PM, Konstantin Kolinko
>>> <knst.kolinko@gmail.com> wrote:
>>>> 2011/4/8 Jörg Schaible <joerg.schaible@gmx.de>:
>>>>> Hi,
>>>>>
>>>>> just a reminder. Such a javadoc comment for a method is completely
>>>>> superfluous:
>>>>>
>>>>> ============ %< =============
>>>>> /**
>>>>> * {@inheritDoc}
>>>>> */
>>>>> ============ %< =============
>>>>>
>>>>> This is what the javadoc nowadays does by default ...
>>>>>
>>>>
>>>> Yes, but personally I like them as a good reminder when looking though
>>>> the code. (Or as "nothing more to add").
>>
>> "Nothing" can be expressed in a simpler way in this case :)
>>
>>> I feel more comfortable seeing them as well (I'm almost certainly the
>>> primary perpetrator of these throughout [lang]); can Checkstyle handle
>>> not requiring a Javadoc comment for example wherever an @Override
>>> annotation is found?
>>
>> It's not bound to @Override (at least not for Java 5). Javadoc inherits the
>> documentation automatically from an overridden method or from the interface
>> method that is implemented.
>>
>> Since we have no consensus yet and in case someone else wants to get rid of
>> it, here is the bash command:
>>
>> ============== %< ============
>> $ cd lang
>> $ sed -i -s -e '\,/\*\*, {
>> N
>> /{@inheritDoc}/ {
>> N
>> \,\*/, {
>> \,/\*\*.*\*/,d
>> }
>> }
>> }' `find src -name "*.java"`
>> $ svn diff
>> ============== %< ============
>
> My sed is a bit rusty - I assume that only removes inheritDoc if there
> is no other text in the block?
> Does it also remove the one-line version?
>
> There are some occasions when inheritDoc can be useful with additional text.
>
>> For me it was always annoying to add these 3 lines increasing lines of code
>> for nothing in pre Java 5 times.
>>
>> - Jörg
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message