Skip to content

Commit 9c48330

Browse files
jeffmauryangelozerr
authored andcommitted
fix: prevent NPE in Qute LS if LSP client does not implement getUserTags
Fixes #579 Signed-off-by: Jeff MAURY <jmaury@redhat.com>
1 parent 3e82e06 commit 9c48330

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

qute.ls/com.redhat.qute.ls/src/main/java/com/redhat/qute/project/tags/UserTagRegistry.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import java.nio.file.Path;
1515
import java.util.Collection;
16+
import java.util.Collections;
1617
import java.util.List;
1718
import java.util.concurrent.CompletableFuture;
1819
import java.util.stream.Collectors;
@@ -114,7 +115,7 @@ protected synchronized CompletableFuture<List<UserTag>> loadBinaryUserTags() {
114115
return getBinaryUserTags(params) //
115116
.thenApply(tagInfos -> {
116117
if (tagInfos == null) {
117-
return null;
118+
return Collections.emptyList();
118119
}
119120
return tagInfos //
120121
.stream() //

0 commit comments

Comments
 (0)