add some nullability annotations

(cherry picked from commit 5e219b680e05b5355341395dd71a975a338b2f58)

GitOrigin-RevId: 18109f83bbabd898be12675ba11219e48c96070d
This commit is contained in:
Morgan Bartholomew
2025-10-21 06:20:05 +00:00
committed by intellij-monorepo-bot
parent ce80dce163
commit ff5fc0c93c
3 changed files with 4 additions and 3 deletions
@@ -25,7 +25,7 @@ import java.util.List;
*/
public interface IntentionActionWithOptions extends IntentionAction {
@NotNull @Unmodifiable
List<IntentionAction> getOptions();
List<@NotNull IntentionAction> getOptions();
/**
* If this intention is used as an inspection quick fix, control what should be displayed in the popup.
@@ -3,11 +3,12 @@ package com.intellij.codeInsight.navigation.actions;
import com.intellij.openapi.editor.Editor;
import com.intellij.psi.PsiElement;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public abstract class GotoDeclarationHandlerBase implements GotoDeclarationHandler {
@Override
public PsiElement @Nullable [] getGotoDeclarationTargets(@Nullable PsiElement sourceElement, int offset, Editor editor) {
public @NotNull PsiElement @Nullable [] getGotoDeclarationTargets(@Nullable PsiElement sourceElement, int offset, Editor editor) {
final PsiElement target = getGotoDeclarationTarget(sourceElement, editor);
return target != null ? new PsiElement[]{target} : null;
}
@@ -962,7 +962,7 @@ public class HighlightInfo implements Segment {
return myCanCleanup;
}
public @NotNull Iterable<? extends IntentionAction> getOptions(@NotNull PsiElement element, @Nullable Editor editor) {
public @NotNull Iterable<? extends @NotNull IntentionAction> getOptions(@NotNull PsiElement element, @Nullable Editor editor) {
if (editor != null && Boolean.FALSE.equals(editor.getUserData(IntentionManager.SHOW_INTENTION_OPTIONS_KEY))) {
return Collections.emptyList();
}