We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c2a29d commit c22b229Copy full SHA for c22b229
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BaseDocumentLifeCycleHandler.java
@@ -426,7 +426,13 @@ public ICompilationUnit handleChanged(DidChangeTextDocumentParams params) {
426
427
try {
428
if (unit.equals(sharedASTProvider.getActiveJavaElement())) {
429
+ // We call clearReconciliation here in an attempt to prevent getAST calls on other threads
430
+ // from caching outdated AST after we just called disposeAST. See also:
431
+ // https://github.com/eclipse/eclipse.jdt.ls/issues/1918
432
+ // https://github.com/eclipse/eclipse.jdt.ls/pull/2714#discussion_r1234817900
433
+ sharedASTProvider.clearReconciliation();
434
sharedASTProvider.disposeAST();
435
436
CodeActionHandler.codeActionStore.clear();
437
}
438
0 commit comments