From bde87d913a8c452b42ec554f667544811355613f Mon Sep 17 00:00:00 2001 From: "Irina.Chernushina" Date: Tue, 16 May 2017 10:05:01 +0200 Subject: [PATCH] correct test info - sometimes static methods of LightQuickFixTestCase are called from other tests, so static project instance from LightQuickFixTestCase should not be used --- .../codeInsight/daemon/quickFix/LightQuickFixTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java index f2de06ab7005..a8c5362c61fc 100644 --- a/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java +++ b/java/testFramework/src/com/intellij/codeInsight/daemon/quickFix/LightQuickFixTestCase.java @@ -143,8 +143,8 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase }) .joining(" "); return "Test: " + testFullPath + "\n" + - "Language level: " + PsiUtil.getLanguageLevel(getProject()) + "\n" + - "SDK: " + ModuleRootManager.getInstance(getModule()).getSdk() + "\n" + + "Language level: " + PsiUtil.getLanguageLevel(quickFix.getProject()) + "\n" + + (quickFix.getProject().equals(getProject()) ? ("SDK: " + ModuleRootManager.getInstance(getModule()).getSdk() + "\n") : "") + "Infos: " + infos; }