3

For overrided methods Eclipse generate javadoc like this:

/* (non-Javadoc)
 * @see com.ncube.qtpokertest.listeners.PlayerChangeListener#
 * nameChanged(com.ncube.qtpokertest.events.PlayerChangeEvent)
 */

it's not a javadoc comment, actually, but it works properly. Checkstyle mark this comment as warning. How can I tune checkstyle to disable this warnings?

Lampapos
  • 1,063
  • 1
  • 12
  • 26

2 Answers2

3

For older Java-Versions (before 1.6):
The @Override Annotation works only for inherited methods of super classes.
So it is better to use

/** {@inheritDoc} */

which works also for methods implementing interfaces.
Checkstyle recognizes this comment as JavaDoc and you have only one place where you describe your method.

mernst
  • 7,437
  • 30
  • 45
salcosand
  • 2,022
  • 4
  • 24
  • 27
3

If I remember correct you should just use the @Override annotation and not write/generate any documentation at all. This should avoid the checkstyle warning but nevertheless generate a JavaDoc which points to the parent JavaDoc (Specified by:).

FrVaBe
  • 47,963
  • 16
  • 124
  • 157