Community
Participate
Working Groups
Build ID: M20090826-1100 An auxiliary problem from bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=279836 is still not fixed for the given build. public class Test { private static final class Contract implements Comparable { @Override public int compareTo(Object o) { return 0; } } } javac compiles without errors but eclipse compiler reports the following on line 5: The method compareTo(Object) of type Test.Contract must override a superclass method
What compliance are you using to compile this code? You need the compliance 1.6 if you don't want a problem to be reported. I checked that it compiles fine using compliance 1.6. Closing as INVALID.
Created attachment 145909 [details] Screenshot of error in build M20090826-1100
Created attachment 145910 [details] using compliance level 1.6 Strange. I'm using 1.6 as well and the error is there.
Srikanth is unable to reproduce either with 1.6, but I am able to consistently reproduce, so will investigate more and reopen the defect if needed.
Are you sure that your project doesn't have a project specific settings pointing to a 1.5 compliance? I tried several times and I can only get the error with the compliance 1.5 and I never get it with the compliance 1.6. This is the expected behavior.
Verified for 3.6M2
Note: I checked and found my project specific settings were indeed wrong..set to compliance 1.5 ! So the bug is surely invalid.
Verified.