Bug 294389 - Enhancement: Add warning for redundant superinterfaces within a multiple "implements" clause
Summary: Enhancement: Add warning for redundant superinterfaces within a multiple "imp...
Status: CLOSED DUPLICATE of bug 288749
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: 3.6 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-05 16:07 EST by Daniel U. Thibault CLA
Modified: 2009-11-05 17:13 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel U. Thibault CLA 2009-11-05 16:07:11 EST
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4 (.NET CLR 3.5.30729)
Build Identifier: 3.5.1

"Window:Preferences:Java:Compiler:Errors/Warnings:Unnecessary code:Redundant super interface" reports redundant interface declarations when the redundancy arises when a class declares an interface implementation that it already inherits from its superclass.  However, there is another redundancy that can occur but that is not reported: namely, when a class declares two interface implementations that happen to enjoy a superinterface relationship.

For instance, if "someInterfaceExtension extends someInterface", then in the declaration "class someClass implements someInterface, someInterfaceExtension", the someInterface implementation declaration is redundant.

This is somewhat different from the extant warning, so it should be reported something like: "Redundant superinterface someInterface for the type someClass, already implemented by someInterfaceExtension".

Reproducible: Always
Comment 1 Daniel U. Thibault CLA 2009-11-05 16:09:27 EST
(In reply to comment #0)
> "Redundant superinterface someInterface for the type someClass,
> already implemented by someInterfaceExtension".

Make that rather "Redundant superinterface someInterface for the type someClass, already implied by someInterfaceExtension", since interfaces don't implement anything.
Comment 2 Olivier Thomann CLA 2009-11-05 17:13:40 EST
This is implemented in 3.6.

*** This bug has been marked as a duplicate of bug 288749 ***