Community
Participate
Working Groups
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.
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