Skip to content

Commit

Permalink
Fix NPE in inlay hints
Browse files Browse the repository at this point in the history
  • Loading branch information
BoykoAlex committed Sep 29, 2024
1 parent 3dd95fa commit 88d357f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
import org.eclipse.lsp4j.Range;
import org.eclipse.lsp4j.jsonrpc.CancelChecker;
import org.springframework.ide.vscode.commons.util.text.TextDocument;
import org.springframework.lang.NonNull;

public interface InlayHintHandler {

List<InlayHint> handle(TextDocument doc, Range range, CancelChecker cancelChecker);
@NonNull List<InlayHint> handle(TextDocument doc, Range range, CancelChecker cancelChecker);

}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public List<InlayHint> handle(TextDocument doc, Range range, CancelChecker cance

private List<InlayHint> computeInlayHints(List<JdtInlayHintsProvider> applicableInlayHintsProviders, IJavaProject jp, CompilationUnit cu, Range r, TextDocument doc) {
if (cu == null) {
return null;
return Collections.emptyList();
}
Collector<InlayHint> collector = new Collector<>();
CompositeASTVisitor visitor = new CompositeASTVisitor();
Expand Down

0 comments on commit 88d357f

Please sign in to comment.