Summary: | [1.5][search] Erasure match doesn't work for binary parameterized types | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dirk Baeumer <dirk_baeumer> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Dirk Baeumer
2005-01-20 08:57:07 EST
When searching for erasure matches I get all matches reported, but the one for List<String> has the erasure bit on as well. I tested it a little bit more with the following example: import java.util.List; public class C { void foo() { List<? extends Number> l1= null; List<Integer> l2= null; } } and get the following result when searching for List<Integer>: import java.util.List; : ERASURE and EQUIVALENT List<? extends Number> : ERASURE List<Integer>: ERASURE IMO the result should be as follows: import java.util.List; : ERASURE List<? extends Number> : EQUIVALENT List<Integer>: EXACT This is due to the fact that List<String> is a ParameterizedBinaryType. Shame on me as I missed ParameterizedBinary* java model elements while implementing generic search... Fixed and released in HEAD. Now search found match for binary parameterized types. I've also verified it works for binary paremeterized methods/constructors. [jdt-core-internal] Changes done in ConstructorPattern and MethodPattern contructor. Also modified extractMethodArguments and storeTypeSignaturesAndArguments methods in JavaSearchPattern. Test cases added in JavaSearchBugs: - testBug83304 - testBug83304_TypeParameterizedElementPattern - testBug83304_TypeGenericElementPattern - testBug83304_TypeStringPattern - testBug83304_MethodParameterizedElementPattern - testBug83304_MethodGenericElementPattern - testBug83304_MethodStringPattern - testBug83304_ConstructorGenericElementPattern - testBug83304_ConstructorParameterizedElementPattern - testBug83304_ConstructorStringPattern Verified in I20050214-0927 for 3.1M5 |