Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 428285

Summary: [1.8][compiler] ECJ fails to recognize ? super Object == { Object }
Product: [Eclipse Project] JDT Reporter: Srikanth Sankaran <srikanth_sankaran>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, noopur_gupta, pradeepb
Version: 4.4   
Target Milestone: BETA J8   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Bug Depends on:    
Bug Blocks: 427787    

Description Srikanth Sankaran CLA 2014-02-16 05:05:47 EST
The following program refuses to compile with ECJ in all modes and compiles
with JDK in all modes. There is no type safety compromise here:

// --
class Reference<T> {
	ReferenceQueue<? super T>  queue;
}
class ReferenceQueue<T> {
}
public class X {
    public static void main(String args[]) {
            Reference<Object> r = null;
            ReferenceQueue<Object> q = r.queue;
    }
}


This is blocking ECJ8 from building JRE8.
Comment 1 Srikanth Sankaran CLA 2014-02-16 05:42:39 EST
Fix and test here: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?h=BETA_JAVA8&id=b1d084f45599e11d80665b306c9b3f617ba97f32

Jay was wondering if we ever built JRE with ECJ  - now we know the answer :)
Comment 2 Noopur Gupta CLA 2014-02-21 04:12:18 EST
Verified as working for Eclipse + Java 8 RC1 using Kepler SR2(RC4) +   
Eclipse Java Development Tools Patch for Java 8 Support (BETA)	
1.0.0.v20140220-2054