From 5e5f5d088f69231a1100b2bdb40f14a0fde6013b Mon Sep 17 00:00:00 2001 From: Andrey Vorobev Date: Wed, 17 Jul 2024 15:20:11 +0300 Subject: [PATCH] WEB-67650 React JSX: false positive attribute className is not allowed here with the new type evaluation GitOrigin-RevId: b83ef3b481005bd00466ec94afc8e9d7dc097af6 --- .../htmlInspections/HtmlUnknownAttributeInspectionBase.java | 2 +- .../htmlInspections/XmlUnknownAttributeQuickFixProvider.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownAttributeInspectionBase.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownAttributeInspectionBase.java index b9cee0fc11be..24c5ae62af96 100644 --- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownAttributeInspectionBase.java +++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/HtmlUnknownAttributeInspectionBase.java @@ -118,7 +118,7 @@ public class HtmlUnknownAttributeInspectionBase extends HtmlUnknownElementInspec } } - private static ProblemHighlightType addUnknownXmlAttributeQuickFixes(XmlTag tag, + private static @NotNull ProblemHighlightType addUnknownXmlAttributeQuickFixes(XmlTag tag, String name, ArrayList quickfixes, ProblemsHolder holder, diff --git a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlUnknownAttributeQuickFixProvider.java b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlUnknownAttributeQuickFixProvider.java index d350a0b31d65..042964ac425a 100644 --- a/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlUnknownAttributeQuickFixProvider.java +++ b/xml/xml-analysis-impl/src/com/intellij/codeInspection/htmlInspections/XmlUnknownAttributeQuickFixProvider.java @@ -9,7 +9,6 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.xml.XmlAttribute; import com.intellij.psi.xml.XmlTag; import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; import java.util.Collection; @@ -29,7 +28,7 @@ public interface XmlUnknownAttributeQuickFixProvider { */ @NotNull Collection<@NotNull LocalQuickFix> getOrRegisterAttributeFixes(@NotNull XmlTag tag, @NotNull String name, ProblemsHolder holder, boolean isFixRequired); - default @Nullable ProblemHighlightType getProblemHighlightType(@NotNull PsiElement element) { + default @NotNull ProblemHighlightType getProblemHighlightType(@NotNull PsiElement element) { return ProblemHighlightType.GENERIC_ERROR_OR_WARNING; } }