Summary: | The move of execute() from AbstractHandler to IHandler causes compile errors in Java 1.5 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Benjamin Pasero <bpasero> | ||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||
Status: | VERIFIED WORKSFORME | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | pwebster | ||||
Version: | 3.4 | ||||||
Target Milestone: | 3.4 RC1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Benjamin Pasero
2008-05-03 04:41:35 EDT
To be more precise: I was implementing my own Handler that extends from AbstractHandler and had the @Override annotation set on the execute() method. There was never an execute method on AbstractHandler ... this is probably a change in the java builder error reporting. PW Hm, for some reason the outline shows an execute() method for me in AbstractHandler although its not there. I also get a warning. This is with 3.3.x as target platform (see screenshot). Created attachment 98528 [details]
Warning
This is the consequence for the fix for bug 225577 We had a bug and added default abstract methods without tagging them as synthetic (ie. not visible to normal searches). If you look at AbstractHandler in a 3.3.x workspace, you'll see the default abstract method execute(ExecutionEvent) in the outliner. The compiler added this default abstract method to the abstract class AbstractHandler, since its superinterface IHandler defined it. In a 3.4M7 workspace, the method no longer appears in the outliner since its now tagged as synthetic & the correct error appears in your source. You can only @Override methods that are actually implemented by your superclasses. Thanks for the explanation. Verified for 3.4 RC1 using build I20080510-2000. |