Bug 294389

Summary: Enhancement: Add warning for redundant superinterfaces within a multiple "implements" clause
Product: [Eclipse Project] JDT Reporter: Daniel U. Thibault <d.u.thibault>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: enhancement    
Priority: P3 CC: d.u.thibault, Olivier_Thomann
Version: 3.6   
Target Milestone: 3.6 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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 ***