From 8d2428db65ae52b13bf58277c6a3897f78d129b6 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Thu, 2 Jan 2020 16:10:05 +0100 Subject: [PATCH] SSR: remove unused parameter GitOrigin-RevId: 4a9cbd8c4114297e9ae1b28aeb8b11df5804d54b --- .../inspection/highlightTemplate/SSBasedInspection.java | 6 +++--- .../intellij/structuralsearch/SSBasedInspectionTest.java | 3 ++- .../com/intellij/structuralsearch/SSRCodeInsightTest.java | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/highlightTemplate/SSBasedInspection.java b/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/highlightTemplate/SSBasedInspection.java index f359e8ba0bf0..420682c15c54 100644 --- a/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/highlightTemplate/SSBasedInspection.java +++ b/platform/structuralsearch/source/com/intellij/structuralsearch/inspection/highlightTemplate/SSBasedInspection.java @@ -1,4 +1,4 @@ -// Copyright 2000-2019 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-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. package com.intellij.structuralsearch.inspection.highlightTemplate; import com.intellij.codeInsight.daemon.HighlightDisplayKey; @@ -44,7 +44,7 @@ import java.util.*; public class SSBasedInspection extends LocalInspectionTool { static final Object LOCK = new Object(); // hack to avoid race conditions in SSR - public static final String SHORT_NAME = "SSBasedInspection"; + @NonNls public static final String SHORT_NAME = "SSBasedInspection"; private final List myConfigurations = ContainerUtil.createLockFreeCopyOnWriteList(); final Set myProblemsReported = new HashSet<>(1); private InspectionProfileImpl mySessionProfile = null; @@ -185,7 +185,7 @@ public class SSBasedInspection extends LocalInspectionTool { } @TestOnly - public void setConfigurations(@NotNull final List configurations, @NotNull final Project project) { + public void setConfigurations(@NotNull final List configurations) { myConfigurations.clear(); myConfigurations.addAll(configurations); } diff --git a/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java b/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java index 9733c6c2711d..daa1d1c516eb 100644 --- a/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java +++ b/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSBasedInspectionTest.java @@ -1,3 +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. package com.intellij.structuralsearch; import com.intellij.codeInspection.ex.LocalInspectionToolWrapper; @@ -32,7 +33,7 @@ public class SSBasedInspectionTest extends JavaInspectionTestCase { options.setSearchPattern("f();"); configurations.add(configuration2); - inspection.setConfigurations(configurations, getProject()); + inspection.setConfigurations(configurations); myWrapper = new LocalInspectionToolWrapper(inspection); } diff --git a/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSRCodeInsightTest.java b/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSRCodeInsightTest.java index 632dac33f3a3..8d3613981edb 100644 --- a/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSRCodeInsightTest.java +++ b/platform/structuralsearch/testSource/com/intellij/structuralsearch/SSRCodeInsightTest.java @@ -1,4 +1,4 @@ -// Copyright 2000-2018 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-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. package com.intellij.structuralsearch; import com.intellij.openapi.fileTypes.StdFileTypes; @@ -69,7 +69,7 @@ public class SSRCodeInsightTest extends UsefulTestCase { options.setFileType(StdFileTypes.JAVA); options.setSearchPattern(searchPattern); - myInspection.setConfigurations(Collections.singletonList(configuration), myFixture.getProject()); + myInspection.setConfigurations(Collections.singletonList(configuration)); myFixture.testHighlighting(true, false, false, getTestName(false) + ".java"); }