File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 7777import com .google .gson .JsonElement ;
7878
7979public class CodeActionHandler {
80+ // Store a few of the latest Code Action results because any one of them might be resolved further.
81+ // Multiple Code Actions are computed in parallel through ForkJoinPool's common pool leading to a race condition where
82+ // the last Code Action request to finish processing is not the client's latest request. History size must scale with pool size.
8083 public static final ResponseStore <Either <ChangeCorrectionProposalCore , CodeActionProposal >> codeActionStore
81- = new ResponseStore <>(ForkJoinPool . commonPool (). getParallelism ( ));
84+ = new ResponseStore <>(Math . max ( ForkJoinPool . getCommonPoolParallelism (), 8 ));
8285 public static final String COMMAND_ID_APPLY_EDIT = "java.apply.workspaceEdit" ;
8386
8487 public static CodeActionOptions createOptions (PreferenceManager preferenceManager ) {
You can’t perform that action at this time.
0 commit comments