Community
Participate
Working Groups
I am attempting to move a legacy project from JBuilderX to Eclipse 3.x. I have created the project and Eclipse now reports the above errors: "The return type is incompatible with..." The project compiles with jdk 1.4.2_06, netbeand 4.0 and JBuilderX. The method in question is returning an array of a static nested class which has been declared in an abstract base class. The method itself is declared as an abstract method in the same base class. I have tried to use Eclipse 3.0, with the same results. The entire project is version-controlled. When i checkout the files and do a "Source->Organize Import" operation on each file, the errors go away. But the organize import really does nothing, because there were no import wildcards and no unused imports to begin with. I have attempted to recreate a test case but it compiles in eclipse. However, it may help you track the issue down. The test case has a similar hierarchy as the one in the project. The project hierarchy is much deeper. Also, the base classes implement a bunch interfaces. Let me know what i can do to help resolve this.
Created attachment 19656 [details] Zip file that contains a class hierachy similar to the one that does not complie ( but unable to reproduce problem ) Zip file
The odd thing is that only a select few classe dont compile. There are other non-abstract classes derived eventuall from the same base class, in the same as well as different packages, that implement the same abstract method and do compile. I did an F4 on the abstract base class and noticed all the classes that fail to compile are derived 3 levels or more from the base class.
Could you give a try to Eclipse 3.1m6 and see whether you reproduce this issue ?
I have done that with similar results: Eclipse Platform Version: 3.1.0 Build id: I20050401-1645
Are there any instance or static methods in the hierarchy with the same name/parameters as the static method?
Whoops, I was trying out different things and forgot to undo my changes. DerivedAbstractClass.getLegalTypes is not static and should have only one boolean parameter. There are not static methods in the hierarchy. I am attaching the corrected java file.
Created attachment 19710 [details] java class fixed to remove the static modifier and the extra parameter
Can you please reattach the complete testcase. The current attachments include 3 different methods that do not override each other. Also please add comments where the errors are occuring in your code.
Please reopen with the complete testcase & indicate where you are seeing the errors.
reopening
Not enough data to assess bug. Also many changes occurred in this area since then.
oops, did mean to close as worksforme
worksforme