diff --git a/python/src/com/jetbrains/python/inspections/PyCompatibilityInspection.java b/python/src/com/jetbrains/python/inspections/PyCompatibilityInspection.java index 382cbe0815b7..4ee578511eec 100644 --- a/python/src/com/jetbrains/python/inspections/PyCompatibilityInspection.java +++ b/python/src/com/jetbrains/python/inspections/PyCompatibilityInspection.java @@ -147,15 +147,6 @@ public class PyCompatibilityInspection extends PyInspection { myHolder = holder; } - @Override - protected final void registerProblem(@Nullable PsiElement node, - @NotNull String message, - @Nullable LocalQuickFix localQuickFix, - boolean asError) { - if (node == null) return; - registerProblem(node, node.getTextRange(), message, localQuickFix, asError); - } - @Override protected void registerProblem(@NotNull PsiElement element, @NotNull TextRange range, diff --git a/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java b/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java index baccc2e3c915..88df9ba33371 100644 --- a/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java +++ b/python/src/com/jetbrains/python/validation/CompatibilityVisitor.java @@ -538,22 +538,17 @@ public abstract class CompatibilityVisitor extends PyAnnotator { } } - protected abstract void registerProblem(@Nullable PsiElement node, - @NotNull String message, - @Nullable LocalQuickFix localQuickFix, - boolean asError); - protected abstract void registerProblem(@NotNull PsiElement node, @NotNull TextRange range, @NotNull String message, @Nullable LocalQuickFix localQuickFix, boolean asError); - protected void registerProblem(@Nullable PsiElement node, @NotNull String message, @Nullable LocalQuickFix localQuickFix) { - registerProblem(node, message, localQuickFix, true); + protected void registerProblem(@NotNull PsiElement node, @NotNull String message, @Nullable LocalQuickFix localQuickFix) { + registerProblem(node, node.getTextRange(), message, localQuickFix, true); } - protected void registerProblem(@Nullable PsiElement node, @NotNull String message) { + protected void registerProblem(@NotNull PsiElement node, @NotNull String message) { registerProblem(node, message, null); } diff --git a/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java b/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java index b1992dd56a3b..effe3928ca99 100644 --- a/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java +++ b/python/src/com/jetbrains/python/validation/UnsupportedFeatures.java @@ -46,15 +46,6 @@ public class UnsupportedFeatures extends CompatibilityVisitor { setVersionsToProcess(Arrays.asList(LanguageLevel.forElement(node))); } - @Override - protected void registerProblem(@Nullable PsiElement node, - @NotNull String message, - @Nullable LocalQuickFix localQuickFix, - boolean asError) { - if (node == null) return; - registerProblem(node, node.getTextRange(), message, localQuickFix, asError); - } - @Override protected void registerProblem(@NotNull PsiElement node, @NotNull TextRange range,