Skip to content

Commit

Permalink
fix: java.lang.IllegalArgumentException: Argument for @NotNull parameter
Browse files Browse the repository at this point in the history
'file' of com/intellij/psi/search/GlobalSearchScope.accept must not be
null

Fixes #721

Signed-off-by: azerr <azerr@redhat.com>
  • Loading branch information
angelozerr committed Jan 1, 2025
1 parent e211838 commit 043173d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void processNames(@NotNull Processor<? super String> processor,
List<WorkspaceSymbolData> items = getWorkspaceSymbols(queryString, true, project);
if (items != null) {
items.stream()
.filter(data -> scope.accept(data.getFile()))
.filter(data -> data.getFile() != null && scope.accept(data.getFile()))
.map(NavigationItem::getName)
.forEach(processor::process);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public WorkspaceSymbolData(String name,
this.presentation = new LSPItemPresentation(name, symbolKind, locationString);
}

@Nullable
public VirtualFile getFile() {
return file;
}
Expand Down

0 comments on commit 043173d

Please sign in to comment.