EnhancedSwitchMigrationInspection: do not show info level in batch: EA-267690

GitOrigin-RevId: 4a4e17c83e1fd37bdfd6369685033de6fa8ad065
This commit is contained in:
Roman Ivanov
2021-06-07 22:02:57 +00:00
committed by intellij-monorepo-bot
parent 9431ae82c3
commit 27fd02ec56
@@ -1,4 +1,4 @@
// Copyright 2000-2020 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.codeInspection;
import com.intellij.codeInsight.BlockUtils;
@@ -53,6 +53,7 @@ public class EnhancedSwitchMigrationInspection extends AbstractBaseJavaLocalInsp
ProblemHighlightType type = myWarnOnlyOnExpressionConversion && replacer.getType() == ReplacementType.Statement
? ProblemHighlightType.INFORMATION
: ProblemHighlightType.GENERIC_ERROR_OR_WARNING;
if (!holder.isOnTheFly() && type == ProblemHighlightType.INFORMATION) return;
List<LocalQuickFix> fixes = new ArrayList<>();
fixes.add(new ReplaceWithSwitchExpressionFix(replacer.getType()));
if (!myWarnOnlyOnExpressionConversion && replacer.getType() == ReplacementType.Statement) {