Bug 337962 - COMPILER_PB_UNAVOIDABLE_GENERIC_TYPE_PROBLEMS misses reference to field from supertype
Summary: COMPILER_PB_UNAVOIDABLE_GENERIC_TYPE_PROBLEMS misses reference to field from ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 06:59 EST by Markus Keller CLA
Modified: 2011-04-26 09:08 EDT (History)
1 user (show)

See Also:


Attachments
Patch under consideration (17.95 KB, patch)
2011-03-15 05:11 EDT, Srikanth Sankaran CLA
no flags Details | Diff

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