Community
Participate
Working Groups
Created attachment 246773 [details] Screenshot master Setup: - launch a new workspace with a 1.8 JDK (with source attachments, i.e. not a JRE) - create a new Java Project using EE: J2SE-1.3 - paste this class: package my; public class Control { Control c; } - select 'Control', press Ctrl+H, and apply settings as in screenshot (search for references to type in workspace, including JRE Libraries) => The search engine wrongly reports potential (inaccurate) matches in the JDK. The problem seems to be that the source attachment on the rt.jar is parsed with a wrong source level. The project's source level must not be used as source level for source attachments of libraries. The actual source level is not available, but the best guess is the Util#getJdkLevel(Object) of the JAR. I think the bug is in MatchLocator#locateMatches(SearchDocument[]) line 1313 and in MatchLocator#initialize(JavaProject, int): The assumption that the project's lookup environment can be used to parse JAR contents is wrong. This bug is the reason for bug 443410 (RenameTypePerfAcceptanceTests#testCold fails). But that test is brittle anyway and I'll fix by using a 1.3 JRE.
Manoj, please take this forward.
Sure Jay. And thanks Markus for the hints - we do get null binding for nodes of the possible matches resulting in potential (inaccurate) matches as listed - solution under investigation.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.