[jbosstools-issues] [JBoss JIRA] Created: (JBIDE-9645) Method EclipseJavaUtil.resolveType returns invalid cached values
Viacheslav Kabanovich (JIRA)
jira-events at lists.jboss.org
Fri Sep 2 18:52:26 EDT 2011
Method EclipseJavaUtil.resolveType returns invalid cached values
----------------------------------------------------------------
Key: JBIDE-9645
URL: https://issues.jboss.org/browse/JBIDE-9645
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: CDI, common/jst/core
Affects Versions: 3.3.0.M2
Reporter: Viacheslav Kabanovich
Assignee: Viacheslav Kabanovich
Fix For: 3.3.0.M4
EXECUTE: Create beans in cdi project
{code}
public class A {
@Inject B.D a;
}
public class B extends C {
}
public class C {
public static class D {}
}
{code}
ASSERT: Injection point is resolved to C.D - check by open-on.
EXECUTE: copy declaration of class D into class B and wait for the incremental build.
FAILURE: Injection point is still resolved to C.D
EXECUTE: Touch class A by an insignificant modification and wait for the incremental build.
ASSERT: Injection point is resolved to B.D
This case is not very actual, but reveals the problem in the simplest way. More actual use case - editing classpath so that a type referenced by a Java source changes resolution.
Cache is cleaned for a modified file. There is no simple logic in cleaning cache for all types that may be affected by a modification, and a thorough check may take so much time that cache will be of no use. I see only one safe solution - to clean cache before each build.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list