Bug 288623

Summary: [clean up] Remove unsupported @Override annotation
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: ASSIGNED --- QA Contact:
Severity: enhancement    
Priority: P3 CC: mn
Version: 3.6Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2009-09-04 07:08:07 EDT
From news://news.eclipse.org:119/h7enfl$56m$2@build.eclipse.org :

> When source code has to be ported back to 1.5 from 1.6 (e.g. to be compatible 
> with OSx) then there is a lot of work in removing the @override annotations 
> for implemented interface methods. It would really help if there was a 
> preference setting to ignore those overrides.

We can't remove the errors in 1.5, since they are mandated by the Java Language Specification. But we could add a Clean Up on the "Unnecessary Code" page e.g. "Remove unsupported @Override".

I'm hesitant to just remove all @Override annotations that cause a compile error in batch, because some of these could be real errors. But we can offer to remove those that are supported in 1.6 but cause an error in 1.5, e.g.:

interface MyRunnable extends Runnable {
    @Override
    public void run();
}