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 cf7cadf commit 564e176
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
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:/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 564e176

Please sign in to comment.