Bug 337962

Summary: COMPILER_PB_UNAVOIDABLE_GENERIC_TYPE_PROBLEMS misses reference to field from supertype
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr
Version: 3.7   
Target Milestone: 3.7 M7   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch under consideration none

Description Markus Keller CLA 2011-02-23 06:59:38 EST
HEAD, follow-up to bug 322817

The JavaCore.COMPILER_PB_UNAVOIDABLE_GENERIC_TYPE_PROBLEMS option misses
references to a raw field from a supertype:

package problems;
import java.util.List;
public class Super {
    protected List fList;
}

package problems;
import java.util.List;
public class Subclass extends Super {
    protected List fSubList; // raw type warning (good)
    
    void foo(String s) {
        fList.add(s); // type safety warning (TODO: bad, should be hidden)
        fSubList.add(s); // type safety warning (good, should not be hidden)
    }
}
Comment 1 Srikanth Sankaran CLA 2011-03-15 05:11:33 EDT
Created attachment 191197 [details]
Patch under consideration
Comment 2 Srikanth Sankaran CLA 2011-03-15 07:40:52 EDT
Released in HEAD for 3.7 M7
Comment 3 Ayushman Jain CLA 2011-04-26 09:07:42 EDT
The classes given in comment 0, when in the same CU give the correct behaviour. But when in different CU's, the correct warning on fSubList also gets suppressed. Opened FUP bug 343838.
Comment 4 Ayushman Jain CLA 2011-04-26 09:08:02 EDT
Verified for 3.7M7 using build I20110425-1800.