Bug 281993

Summary: [1.5][compiler] Generics inference no longer works (worked under 3.4)
Product: [Eclipse Project] JDT Reporter: Benoit Xhenseval <bx>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: njbartlett, Olivier_Thomann, srikanth_sankaran
Version: 3.5   
Target Milestone: 3.6 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Test cases. MyClass does not compile none

Description Benoit Xhenseval CLA 2009-06-30 08:02:16 EDT
Created attachment 140494 [details]
Test cases. MyClass does not compile

Build ID: 20090621-0832

Steps To Reproduce:
1. The enclosed very simple testcase, MyClass.java compiles under 3.4 but no longer under 3.5
2. use JDK 1.6, (013), used JDK1.6 compliance


More information:
Moving from 3.4 to 3.5, my project suddenly stopped compiling under Eclipse (it still compiles ok with javac and Maven).

It seems that the method call wants to infer the type to a MyReader (interface) rather than the AReader, a concrete class.

The factory method however is defined as:
T getDBReaderByClass(final Class<T> dbReaderClass)

So, given a AReader.class I would expect this to return AReader instance.
Comment 1 Kent Johnson CLA 2009-07-06 14:48:39 EDT

*** This bug has been marked as a duplicate of bug 277643 ***
Comment 2 Srikanth Sankaran CLA 2009-08-04 04:56:13 EDT
Verified for 3.6M1