Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-9645

Method EclipseJavaUtil.resolveType returns invalid cached values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.3.0.M4
    • 3.3.0.M2
    • cdi, common
    • None

      EXECUTE: Create beans in cdi project

      public class A {
      	@Inject B.D a;
      }
      
      public class B extends C {
      	
      }
      
      public class C {
      	public static class D {}
      }
      

      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.

            scabanovich Viacheslav Kabanovich (Inactive)
            scabanovich Viacheslav Kabanovich (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: