Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343257 - [javadoc] compiler should issue warning for useless {@inheritDoc}
Summary: [javadoc] compiler should issue warning for useless {@inheritDoc}
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT Core Triaged CLA
QA Contact: Ayushman Jain CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 06:53 EDT by Dani Megert CLA
Modified: 2011-04-23 06:37 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-04-19 06:53:48 EDT
3.7 M6.

The compiler should issue a warning for useless {@inheritDoc}:

public class Try {
    public void m() {}
}
class Sub extends Try {
    /**
     * {@inheritDoc}
     */
    public void m() {}
}
Comment 1 Ayushman Jain CLA 2011-04-19 07:40:52 EDT
This option may have only limited use. Maybe somebody did not yet document the base method but still used the inheritDoc tag to make sure whenever the base method is documented in the future, the overriding method also inherits it. Also, why will someone put the inheritDoc tag while overriding a method with no doc?
Comment 2 Dani Megert CLA 2011-04-19 08:03:21 EDT
>This option may have only limited use.
I disagree. It's the same as other options that warn about missing stuff (e.g. warning about missing doc or missing @param).

> Also, why will someone put the inheritDoc tag while overriding a method with > no doc?
Because he used a template? Because he's lazy?
Comment 3 Ayushman Jain CLA 2011-04-19 09:54:20 EDT
Ok. Will investigate post 3.7.