From 17d84a16819fa50a027ff8de5b5f01e6159c688e Mon Sep 17 00:00:00 2001 From: Nikita Eshkeev Date: Tue, 25 May 2021 14:14:55 +0300 Subject: [PATCH] [freeze][dataflow from here] IDEA-268322 Freeze when Analyze Data Flow from Here This patch restores the blocking read computation in JavaOverridingMethodsSearcher because the "nonBlocking()" call changes semantics of JavaOverridingMethodSearcher. Nonblocking made it be interrupted by write actions and everything became invalid in the middle of a computation, which might have affected the clients. The analyze from/to here panel should be rewritten to the async model with the help from AsyncTreeModel. GitOrigin-RevId: ed6864ba098724487f9836ecf880bbed60da0545 --- .../psi/impl/search/JavaOverridingMethodsSearcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java index 86deafdf540c..341cc63bf22b 100644 --- a/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java +++ b/java/java-indexing-impl/src/com/intellij/psi/impl/search/JavaOverridingMethodsSearcher.java @@ -1,4 +1,4 @@ -// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. +// Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.psi.impl.search; import com.intellij.ide.highlighter.JavaFileType; @@ -113,7 +113,7 @@ public class JavaOverridingMethodsSearcher implements QueryExecutor result = new HashSet<>(); Processor inheritorsProcessor = inheritor -> { - PsiMethod found = ReadAction.nonBlocking(() -> findOverridingMethod(inheritor, method, containingClass)).executeSynchronously(); + PsiMethod found = ReadAction.compute(() -> findOverridingMethod(inheritor, method, containingClass)); if (found != null) { synchronized (result) { result.add(found);