Bug 287816

Summary: Eclipse compiler shows error on javac-valid construct: raw types on overridden methods
Product: [Eclipse Project] JDT Reporter: Ayushman Jain <amj87.iitr>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED INVALID QA Contact:
Severity: normal    
Priority: P3 CC: Olivier_Thomann, srikanth_sankaran
Version: 3.5   
Target Milestone: 3.6 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Screenshot of error in build M20090826-1100
none
using compliance level 1.6 none

Description Ayushman Jain CLA 2009-08-27 08:40:02 EDT
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
Comment 1 Olivier Thomann CLA 2009-08-27 10:01:36 EDT
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.
Comment 2 Ayushman Jain CLA 2009-08-28 05:32:16 EDT
Created attachment 145909 [details]
Screenshot of error in build M20090826-1100
Comment 3 Ayushman Jain CLA 2009-08-28 05:33:23 EDT
Created attachment 145910 [details]
using compliance level 1.6

Strange. I'm using 1.6 as well and the error is there.
Comment 4 Ayushman Jain CLA 2009-08-28 06:27:01 EDT
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.
Comment 5 Olivier Thomann CLA 2009-08-28 12:20:11 EDT
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.
Comment 6 Ayushman Jain CLA 2009-09-15 03:08:57 EDT
Verified for 3.6M2
Comment 7 Ayushman Jain CLA 2009-09-15 06:58:31 EDT
Note: I checked and found my project specific settings were indeed wrong..set to compliance 1.5 ! So the bug is surely invalid.
Comment 8 Olivier Thomann CLA 2009-09-15 09:06:48 EDT
Verified.