| Summary: | [infer type arguments] introduces error with multiply-nested collections | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Grant Gayed <grant_gayed> |
| Component: | UI | Assignee: | Markus Keller <markus.kell.r> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
|
Description
Grant Gayed
Here's a shrunken version of the problem:
import java.util.ArrayList;
import java.util.List;
public class Try {
List table= new ArrayList();
void a() {
List inner= new ArrayList();
inner.add("bla");
table.add(inner);
}
void b() {
List inner= getInner();
String s= (String) inner.get(0);
}
List getInner() {
List inner= (List) table.get(0);
return null;
}
}
Another issue is that setItemsSorted (List list, Hashtable items) is called with different Hashtable<String, ?>. The algorithm currently cannot infer such wildcard signatures. It should leave 'items' raw in this case, but currently just chooses one of the parameterizations.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |