From e95b35fbc43e4a5af5f25f5dfd6cbec69c0cb9e4 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Thu, 11 May 2017 23:00:36 +0300 Subject: [PATCH] frequently used super class inspection: fix tests --- .../com/intellij/compiler/inspection/ChangeSuperClassFix.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/java/compiler/impl/src/com/intellij/compiler/inspection/ChangeSuperClassFix.java b/java/compiler/impl/src/com/intellij/compiler/inspection/ChangeSuperClassFix.java index a7638061e1cc..91eb090f6472 100644 --- a/java/compiler/impl/src/com/intellij/compiler/inspection/ChangeSuperClassFix.java +++ b/java/compiler/impl/src/com/intellij/compiler/inspection/ChangeSuperClassFix.java @@ -20,6 +20,7 @@ import com.intellij.codeInsight.daemon.GroupNames; import com.intellij.codeInsight.intention.HighPriorityAction; import com.intellij.codeInspection.LocalQuickFix; import com.intellij.codeInspection.ProblemDescriptor; +import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.WriteAction; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; @@ -193,6 +194,9 @@ public class ChangeSuperClassFix implements LocalQuickFix, HighPriorityAction { private static List getOverridenMethodsToDelete(List candidates, String newClassName, Project project) { + if (ApplicationManager.getApplication().isUnitTestMode()) { + return candidates.stream().map(c -> (PsiMethod)c.getMember()).collect(Collectors.toList()); + } MemberSelectionPanel panel = new MemberSelectionPanel("Choose members to delete since they are already defined in " + newClassName + "", candidates,