Community
Participate
Working Groups
The summary says all: public class Test { void test1() { class Dummy {}; Dummy d = new Dummy(); } void test2() { class Dummy {}; Dummy d = new Dummy(); } } Renaming the first to DummyA gives: public class Test { void test1() { class DummyA {}; DummyA d = new DummyA(); } void test2() { class Dummy {}; DummyA d = new DummyA(); // <- wrong! } }
Move to JDT/UI
This is a JDT/Core search issue. Search for references to test1.Dummy class returns 4 matches instead of 2 expected ones...
If time permit
Fixed and released in HEAD. Search engine now verifies when focus is not null that its parent matches enclosingMethod of method binding match (if exist). [jdt-core-internal] Changes done in TypeReferenceLocator.matchReportReference(Expression, int, TypeBinding, MatchLocator). Test case added in JavaSearchBugsTests. Note that JavaSearchTests.testTypeReference37 has been also modified has this fix detected that it was invalid (searched method didn't exist...)
Verified for 3.1 M7 using build I20050509-2010 + jdt.core HEAD.