Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 153734 - Bridge methods are ignored during method lookup with -source 1.4
Summary: Bridge methods are ignored during method lookup with -source 1.4
Status: RESOLVED DUPLICATE of bug 124943
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 04:05 EDT by Gernot CLA
Modified: 2006-08-14 10:49 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gernot CLA 2006-08-14 04:05:43 EDT
The following TestCase does not compile if you specify the compiler option -source 1.4. It seems as if the compiler did not consider the bridge method "int compare(Object o)" in class java.lang.Integer a valid overload, although it ought to be. 
This behaviour prevents our whole project from building in a JDK5 environment!

public class TestLookup {
   public static void main(String[] args) {
    
       Integer i1 = new Integer(0);
       Object i2 = new Integer(1);
       i1.compareTo(i2);
}
}
Comment 1 Gernot CLA 2006-08-14 10:49:10 EDT
Nice, seems to have been fixed for Eclipse 3.2

*** This bug has been marked as a duplicate of 124943 ***