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.