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); }