diff --git a/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionToolWrapper.java b/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionToolWrapper.java index 46bd56e55668..fc65b991cdc1 100644 --- a/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionToolWrapper.java +++ b/platform/analysis-api/src/com/intellij/codeInspection/ex/InspectionToolWrapper.java @@ -37,6 +37,8 @@ import java.net.URL; * Date: 9/28/11 */ public abstract class InspectionToolWrapper { + public static final InspectionToolWrapper[] EMPTY_ARRAY = new InspectionToolWrapper[0]; + private static final Logger LOG = Logger.getInstance("#com.intellij.codeInspection.ex.InspectionToolWrapper"); protected T myTool; diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/GotoInspectionModel.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/GotoInspectionModel.java index e02c51a9a7a4..8c6f7de850ab 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/GotoInspectionModel.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/GotoInspectionModel.java @@ -35,7 +35,6 @@ import java.util.Map; * @author Konstantin Bulenkov */ public class GotoInspectionModel extends SimpleChooseByNameModel { - private static final InspectionToolWrapper[] EMPTY_WRAPPERS_ARRAY = new InspectionToolWrapper[0]; private final Map myToolNames = new HashMap<>(); private final String[] myNames; private final InspectionListCellRenderer myListCellRenderer = new InspectionListCellRenderer(); @@ -69,7 +68,7 @@ public class GotoInspectionModel extends SimpleChooseByNameModel { public Object[] getElementsByName(final String name, final String pattern) { final InspectionToolWrapper tool = myToolNames.get(name); if (tool == null) { - return EMPTY_WRAPPERS_ARRAY; + return InspectionToolWrapper.EMPTY_ARRAY; } return new InspectionToolWrapper[] {tool}; } diff --git a/platform/testFramework/src/com/intellij/mock/MockInspectionProfile.java b/platform/testFramework/src/com/intellij/mock/MockInspectionProfile.java index 1b5753f3acf0..fbbe38ef0fb1 100644 --- a/platform/testFramework/src/com/intellij/mock/MockInspectionProfile.java +++ b/platform/testFramework/src/com/intellij/mock/MockInspectionProfile.java @@ -29,7 +29,7 @@ import java.util.Set; * @author peter */ public class MockInspectionProfile extends InspectionProfileImpl { - private InspectionToolWrapper[] myInspectionTools = new InspectionToolWrapper[0]; + private InspectionToolWrapper[] myInspectionTools = InspectionToolWrapper.EMPTY_ARRAY; private final Set myDisabledTools = new THashSet<>(); public MockInspectionProfile() {