Summary: | [1.5][compiler] type mismatch with Collections.emptyList and wildcard | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Andrew Bachmann <AndrewBachmann> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.2 | ||
Target Milestone: | 3.1.2 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Andrew Bachmann
2005-11-03 16:57:28 EST
A workaround that doesn't involve suppressing warnings is to explicitly supply the extended type: public List<? extends Interface> field = Collections.<Interface>emptyList(); A patch for 3.1.1 is available, see some comment in bug 112268. Added regression test: GenericTypeTest#test866 *** This bug has been marked as a duplicate of 112268 *** Verified in M20060109-0800 for 3.1.2 |