Bug 287816 - Eclipse compiler shows error on javac-valid construct: raw types on overridden methods
Summary: Eclipse compiler shows error on javac-valid construct: raw types on overridde...
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-27 08:40 EDT by Ayushman Jain CLA
Modified: 2009-09-15 09:06 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot of error in build M20090826-1100 (91.19 KB, image/gif)
2009-08-28 05:32 EDT, Ayushman Jain CLA
no flags Details
using compliance level 1.6 (102.26 KB, image/gif)
2009-08-28 05:33 EDT, Ayushman Jain CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.