You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sebb <se...@gmail.com> on 2011/08/17 17:09:06 UTC

[POOL] @inheritDoc tags for @throws clauses in LinkedBlockingDeque

Eclipse complains about all the @inheritDoc tags in LinkedBlockingDeque.

AFAICT, @inheritDoc is allowed in @throws, but only if the method has
something to inherit from, i.e.. it overrides a super-class method or
implements an interface (Java 1.6+)
It does not inherit from the Throwable, which was perhaps the intention?

Oracle Java 1.5 is happy to allow @inheritDoc in the add() method -
because that overrides - but Eclipse complains.
[Looks like bug in Eclipse javadoc handling]

However, neither Oracle nor Eclipse allow the tag if there is no
parent, so I propose to remove such tags.

OK?

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


Re: [POOL] @inheritDoc tags for @throws clauses in LinkedBlockingDeque

Posted by Gary Gregory <ga...@gmail.com>.
+1, who's on first again?

Gary

On Wed, Aug 17, 2011 at 11:09 AM, sebb <se...@gmail.com> wrote:

> Eclipse complains about all the @inheritDoc tags in LinkedBlockingDeque.
>
> AFAICT, @inheritDoc is allowed in @throws, but only if the method has
> something to inherit from, i.e.. it overrides a super-class method or
> implements an interface (Java 1.6+)
> It does not inherit from the Throwable, which was perhaps the intention?
>
> Oracle Java 1.5 is happy to allow @inheritDoc in the add() method -
> because that overrides - but Eclipse complains.
> [Looks like bug in Eclipse javadoc handling]
>
> However, neither Oracle nor Eclipse allow the tag if there is no
> parent, so I propose to remove such tags.
>
> OK?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>


-- 
Thank you,
Gary

http://garygregory.wordpress.com/
http://garygregory.com/
http://people.apache.org/~ggregory/
http://twitter.com/GaryGregory

Re: [POOL] @inheritDoc tags for @throws clauses in LinkedBlockingDeque

Posted by sebb <se...@gmail.com>.
On 17 August 2011 16:09, sebb <se...@gmail.com> wrote:
> Eclipse complains about all the @inheritDoc tags in LinkedBlockingDeque.
>
> AFAICT, @inheritDoc is allowed in @throws, but only if the method has
> something to inherit from, i.e.. it overrides a super-class method or
> implements an interface (Java 1.6+)
> It does not inherit from the Throwable, which was perhaps the intention?
>
> Oracle Java 1.5 is happy to allow @inheritDoc in the add() method -
> because that overrides - but Eclipse complains.
> [Looks like bug in Eclipse javadoc handling]

Actually, just discovered that Oracle Javadoc has problems too - it
does not complain about the tag for overriding methods, but does not
import the details either - the generated Javadoc for add(<E>)
contains

    Overrides:
        add in class AbstractQueue<E>

    Throws:
        {@inheritDoc}

which is not at all helpful ...

So it now looks like all the inheritDoc tags should be removed from
throws clauses.

> However, neither Oracle nor Eclipse allow the tag if there is no
> parent, so I propose to remove such tags.
>
> OK?
>

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