Summary: | [1.5] Problems with generic maps | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Marco Qualizza <mlq.eclipse> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | mmcdouga |
Version: | 3.0 | ||
Target Milestone: | 3.1 M2 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Marco Qualizza
2004-08-25 17:19:31 EDT
The line in #entrySet that causes the problem is "return this.backingMap.entrySet();" Re: the first problem. If you define #entrySet() as: public Set<Entry<String, V>> entrySet() { return backingMap.entrySet(); } (ie/ you're not specifying Map.Entry, you're only saying Entry) Then your error message turns into: "Type mismatch: cannot convert from Set<Map<K,V>.Entry<String,V>> to Set<Map<String,V>.Entry<String,V>>" *** Bug 73608 has been marked as a duplicate of this bug. *** I was able to work around bug73608 using non-generic types and a cast. Not pretty, but ok for now. There was a problem constructed binding for parameterized static member types, resulting in non comparable types being built. Fixed in latest, added regression tests: GenericTypeTest#test297 & test298. Verified that problem 1 is fixed for 3.1 M2 with build I200409231635. I'll open a other bug for problem 2 (putAll overriding not warned) which is still not fixed. |