From 0d7aeed5977ab6abdba8fcd718edecddcc790a2e Mon Sep 17 00:00:00 2001 From: Konstantin Aleev Date: Wed, 15 Jan 2020 19:16:42 +0300 Subject: [PATCH] cleanup: add @NotNull for suppressInspectionFor method parameter GitOrigin-RevId: bfd3f4450ddde033460e749aac43ee3b79ce6768 --- .../AlphaUnsortedPropertiesFileInspectionSuppressor.java | 3 ++- .../intellij/lang/properties/AlphaUnsortedInspectionTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/properties/properties-psi-impl/src/com/intellij/codeInspection/unsorted/AlphaUnsortedPropertiesFileInspectionSuppressor.java b/plugins/properties/properties-psi-impl/src/com/intellij/codeInspection/unsorted/AlphaUnsortedPropertiesFileInspectionSuppressor.java index 60ad74bee5b8..a6b2f9e0c1fc 100644 --- a/plugins/properties/properties-psi-impl/src/com/intellij/codeInspection/unsorted/AlphaUnsortedPropertiesFileInspectionSuppressor.java +++ b/plugins/properties/properties-psi-impl/src/com/intellij/codeInspection/unsorted/AlphaUnsortedPropertiesFileInspectionSuppressor.java @@ -17,6 +17,7 @@ package com.intellij.codeInspection.unsorted; import com.intellij.lang.properties.psi.PropertiesFile; import com.intellij.openapi.extensions.ExtensionPointName; +import org.jetbrains.annotations.NotNull; /** * @author Dmitry Batkovich @@ -24,5 +25,5 @@ import com.intellij.openapi.extensions.ExtensionPointName; public interface AlphaUnsortedPropertiesFileInspectionSuppressor { ExtensionPointName EP_NAME = ExtensionPointName.create("com.intellij.properties.alphaUnsortedInspectionSuppressor"); - boolean suppressInspectionFor(final PropertiesFile propertiesFile); + boolean suppressInspectionFor(@NotNull PropertiesFile propertiesFile); } diff --git a/plugins/properties/testSrc/com/intellij/lang/properties/AlphaUnsortedInspectionTest.java b/plugins/properties/testSrc/com/intellij/lang/properties/AlphaUnsortedInspectionTest.java index 11756091a2ca..8d3b0b585a3f 100644 --- a/plugins/properties/testSrc/com/intellij/lang/properties/AlphaUnsortedInspectionTest.java +++ b/plugins/properties/testSrc/com/intellij/lang/properties/AlphaUnsortedInspectionTest.java @@ -9,6 +9,7 @@ import com.intellij.lang.properties.psi.PropertiesFile; import com.intellij.openapi.application.PluginPathManager; import com.intellij.testFramework.ExtensionTestUtil; import com.intellij.testFramework.fixtures.BasePlatformTestCase; +import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.Locale; @@ -29,7 +30,7 @@ public class AlphaUnsortedInspectionTest extends BasePlatformTestCase { ExtensionTestUtil.maskExtensions(AlphaUnsortedPropertiesFileInspectionSuppressor.EP_NAME, Collections.singletonList(new AlphaUnsortedPropertiesFileInspectionSuppressor() { @Override - public boolean suppressInspectionFor(PropertiesFile propertiesFile) { + public boolean suppressInspectionFor(@NotNull PropertiesFile propertiesFile) { return propertiesFile.getName().toLowerCase(Locale.ENGLISH).contains("suppress"); } }), myFixture.getTestRootDisposable());