From 7dbe9895c84e622196543ae6c9973eb2cf2a47e2 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Fri, 12 Aug 2016 12:46:44 +0300 Subject: [PATCH] inspection view: entity in RefElementNode can be null => use @Nullable --- .../codeInspection/deadCode/UnusedDeclarationPresentation.java | 2 +- .../intellij/codeInspection/ui/InspectionToolPresentation.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java index 43808841410d..06fbc47cd23e 100644 --- a/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java +++ b/java/java-impl/src/com/intellij/codeInspection/deadCode/UnusedDeclarationPresentation.java @@ -403,7 +403,7 @@ public class UnusedDeclarationPresentation extends DefaultInspectionToolPresenta @NotNull @Override - public RefElementNode createRefNode(@NotNull RefEntity entity) { + public RefElementNode createRefNode(@Nullable RefEntity entity) { return new RefElementNode(entity, this) { @Nullable @Override diff --git a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionToolPresentation.java b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionToolPresentation.java index 32712db58793..d77a3d7d34e6 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionToolPresentation.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/ui/InspectionToolPresentation.java @@ -50,7 +50,7 @@ public interface InspectionToolPresentation extends ProblemDescriptionsProcessor final boolean groupBySeverity); @NotNull - default RefElementNode createRefNode(@NotNull RefEntity entity) { + default RefElementNode createRefNode(@Nullable RefEntity entity) { return new RefElementNode(entity, this); }