| Summary: | [search] Search for method references sometimes reports potential match with differing argument count | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | dirk_baeumer |
| Version: | 3.1 | ||
| Target Milestone: | 3.1 RC2 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 97324 | ||
I agree that potentional matches should not be reported for different argument counts. +1 for RC2 Fixed and released in HEAD. When message send was flagged as error, its resolved type may be null if problem reason is "not found". In this case search engine did return systematically an inaccurate match although it has to verify first that arguments number matches the pattern. [jdt-core internal] Change done in MethodLocator.resolve(MessageSend). Test case added in JavaSearchBugsTests Verified using N20050606-0010 + JDT/Core HEAD Verified with I20050610-0010 |
I20050527-1300 Search for references to myMethod(..) reports a potential match in this example: class Tester { static void myMethod(int a, String b) {} void call() { myMethod(12); } } But when I make the method non-static, no potential match is returned. This is inconsistent. JDT/UI assumed that potential matches are only reported for build path problems, visibility problems, or non-matching parameter/argument types, but not for references with differing argument counts.