#543 JavaDoc @return for annotations

release_5.0
open
nobody
5
2014-02-09
2009-03-12
Jesper Pedersen
No

I have the following:

@Documented
@Retention(RUNTIME)
@Target(TYPE)
public @interface Activation
{

/*
* Indicates the message listener type(s) associated with this activation.
*
* @return The Java types of the Message Listener interface this
* activation-spec is associated with.

/
Class[] messageListeners() default { };
}

But I get an "Unused Javadoc tag" for the @return, which is incorrect, since the documentation is picked by javadoc.

This is with 5.0.beta01.

Discussion

  • Johan Walles
    Johan Walles
    2010-03-24

    Suffering from this as well.

    Thanks! /J

     
  • Amit Shah
    Amit Shah
    2010-11-14

    This seems to be an intended functionality after looking at the code :). There is a JUnit test case which validates that the @return tag actually should not be present.

     
  • Nick Williams
    Nick Williams
    2013-06-13

    Just because there's a unit test that validates this behavior, doesn't mean it's right. Annotation attributes clearly require @return tags in their Javadoc. Why hasn't this been fixed yet?

     
  • Nick Williams
    Nick Williams
    2013-06-13

    Worse! I can't suppress or disable this one error! The only way I can make it go away is to disable the JavadocMethod check completely for the affected files! That's horrendous! Now I miss potentially many other errors.

     
    Last edit: Nick Williams 2013-06-13
  • Roman Ivanov
    Roman Ivanov
    2014-02-06

    • labels: Core Framework --> Core Framework, JavaDoc