cleanup: notnull

GitOrigin-RevId: b9f0a6733f75532e5a854d17ac7dbcf087319dd2
This commit is contained in:
Alexey Kudravtsev
2024-01-30 20:17:42 +00:00
committed by intellij-monorepo-bot
parent 0df4711bb8
commit e9ba43b999
12 changed files with 19 additions and 12 deletions
@@ -3,6 +3,7 @@ package com.intellij.java.codeInsight.intention;
import com.intellij.codeInsight.daemon.LightIntentionActionTestCase;
import com.intellij.refactoring.BaseRefactoringProcessor;
import org.jetbrains.annotations.NotNull;
public class BoundedWildcardFixTest extends LightIntentionActionTestCase {
@Override
@@ -11,7 +12,7 @@ public class BoundedWildcardFixTest extends LightIntentionActionTestCase {
}
@Override
protected void doSingleTest(String fileSuffix, String testDataPath) {
protected void doSingleTest(@NotNull String fileSuffix, String testDataPath) {
BaseRefactoringProcessor.ConflictsInTestsException.withIgnoredConflicts(()-> super.doSingleTest(fileSuffix, testDataPath));
}
}
@@ -21,6 +21,7 @@ import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiNamedElement;
import com.intellij.refactoring.invertBoolean.InvertBooleanProcessor;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.annotations.NotNull;
@TestDataPath("$CONTENT_ROOT/testData/refactoring/invertBoolean/")
public class InvertBooleanTest extends LightRefactoringParameterizedTestCase {
@@ -45,7 +46,7 @@ public class InvertBooleanTest extends LightRefactoringParameterizedTestCase {
}
@Override
public String getFileSuffix(String beforeFile) {
public String getFileSuffix(@NotNull String beforeFile) {
return !beforeFile.contains(AFTER_PREFIX) && !beforeFile.endsWith(CONFLICTS_SUFFIX) ? beforeFile : null;
}
}
@@ -14,13 +14,13 @@ import org.junit.runner.RunWith;
@RunWith(Parameterized.class)
public abstract class LightQuickFixParameterizedTestCase extends LightQuickFixTestCase implements FileBasedTestCaseHelperEx {
@Override
public String getRelativeBasePath() {
public @NotNull String getRelativeBasePath() {
return getBasePath();
}
@Nullable
@Override
public String getFileSuffix(String fileName) {
public String getFileSuffix(@NotNull String fileName) {
if (!fileName.startsWith(BEFORE_PREFIX)) return null;
return fileName.substring(BEFORE_PREFIX.length());
}
@@ -215,7 +215,7 @@ public abstract class LightQuickFixTestCase extends LightDaemonAnalyzerTestCase
doTestFor(fileSuffix, createWrapper());
}
protected void doSingleTest(String fileSuffix, String testDataPath) {
protected void doSingleTest(@NotNull String fileSuffix, String testDataPath) {
doTestFor(fileSuffix, createWrapper(testDataPath));
}
@@ -18,6 +18,7 @@ package com.intellij.codeInsight.editorActions;
import com.intellij.testFramework.FileBasedTestCaseHelper;
import com.intellij.testFramework.LightPlatformCodeInsightTestCase;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -34,7 +35,7 @@ public class IndentingBackspaceHandlerTest extends LightPlatformCodeInsightTestC
@Nullable
@Override
public String getFileSuffix(String fileName) {
public String getFileSuffix(@NotNull String fileName) {
return fileName.contains("-after.") ? null : fileName;
}
}
@@ -26,7 +26,7 @@ public class BraceHighlightingHandlerBlockCaretTest extends LightPlatformCodeIns
@Nullable
@Override
public String getFileSuffix(String fileName) {
public String getFileSuffix(@NotNull String fileName) {
return StringUtil.endsWith(fileName, ".txt") ? null : fileName;
}
@@ -35,7 +35,7 @@ public class BraceHighlightingHandlerTest extends LightPlatformCodeInsightTestCa
@Nullable
@Override
public String getFileSuffix(String fileName) {
public String getFileSuffix(@NotNull String fileName) {
return StringUtil.endsWith(fileName, ".txt") ? null : fileName;
}
@@ -38,7 +38,7 @@ public class HeavyBraceHighlighterTest extends LightPlatformCodeInsightTestCase
}
@Override
public @Nullable String getFileSuffix(String fileName) {
public @Nullable String getFileSuffix(@NotNull String fileName) {
return StringUtil.endsWith(fileName, ".txt") ? null : fileName;
}
@@ -16,6 +16,7 @@
package com.intellij.openapi.editor.actions;
import com.intellij.testFramework.*;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -33,7 +34,7 @@ public class EditorMultiCaretActionTest extends LightPlatformCodeInsightTestCase
@Nullable
@Override
public String getFileSuffix(String fileName) {
public String getFileSuffix(@NotNull String fileName) {
int pos = fileName.indexOf("-before.");
if (pos < 0) {
return null;
@@ -39,7 +39,7 @@ public class MatchBraceTest extends LightPlatformCodeInsightTestCase implements
@Nullable
@Override
public String getFileSuffix(String fileName) {
public String getFileSuffix(@NotNull String fileName) {
int pos = fileName.indexOf("-before.");
if (pos < 0) {
return null;
@@ -33,7 +33,7 @@ public interface FileBasedTestCaseHelper {
* @return for 'before' files should return core file name or null otherwise
*/
@Nullable
String getFileSuffix(String fileName);
String getFileSuffix(@NotNull String fileName);
/**
* @return for 'after' files should return core file name or null otherwise
@@ -16,9 +16,12 @@
package com.intellij.testFramework;
import org.jetbrains.annotations.NotNull;
public interface FileBasedTestCaseHelperEx extends FileBasedTestCaseHelper {
/**
* @return path related to the test data root according to {@link LightPlatformCodeInsightTestCase#getTestDataPath()}
*/
@NotNull
String getRelativeBasePath();
}