Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343257

Summary: [javadoc] compiler should issue warning for useless {@inheritDoc}
Product: [Eclipse Project] JDT Reporter: Dani Megert <daniel_megert>
Component: CoreAssignee: JDT Core Triaged <jdt-core-triaged>
Status: NEW --- QA Contact: Ayushman Jain <amj87.iitr>
Severity: enhancement    
Priority: P3 CC: amj87.iitr, markus.kell.r, stanio
Version: 3.7   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

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.