Skip to content

Commit

Permalink
textDocument/definition should not send 'null' result
Browse files Browse the repository at this point in the history
See: #309
  • Loading branch information
kdvolder committed Jun 28, 2019
1 parent a8f0ea0 commit 278cb6b
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -352,7 +352,11 @@ public CompletableFuture<Either<List<? extends Location>, List<? extends Locatio
if (h != null) {
return async.invoke(() -> {
List<Location> locations = h.handle(position);
return Either.<List<? extends Location>, List<? extends LocationLink>>forLeft(locations);
if (locations==null) {
// vscode client does not like to recieve null result. See: https://github.com/spring-projects/sts4/issues/309
locations = ImmutableList.of();
}
return Either.forLeft(locations);
});
}
return CompletableFuture.completedFuture(Either.forLeft(ImmutableList.of()));
Expand Down

0 comments on commit 278cb6b

Please sign in to comment.