Skip to content

fix(tests): Construct valid command in MockTextDocumentService#1534

Merged
rubenporras merged 1 commit into
eclipse-lsp4e:mainfrom
FlorianKroiss:fix-invalid-command
May 19, 2026
Merged

fix(tests): Construct valid command in MockTextDocumentService#1534
rubenporras merged 1 commit into
eclipse-lsp4e:mainfrom
FlorianKroiss:fix-invalid-command

Conversation

@FlorianKroiss
Copy link
Copy Markdown
Contributor

When executing tests locally, one can observe this error, because the constructor of Command expects a non-null String

  06:46:47 SEVERE [org.eclipse.lsp4j.jsonrpc.RemoteEndpoint] Internal error: Property must not be null: command 
  java.lang.NullPointerException: Property must not be null: command
  	at org.eclipse.lsp4j.jsonrpc.util.Preconditions.checkNotNull(Preconditions.java:29)
  	at org.eclipse.lsp4j.Command.<init>(Command.java:56)
  	at org.eclipse.lsp4e.tests.mock.MockTextDocumentService.codeLens(MockTextDocumentService.java:219)
  	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
  	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
  	at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.request(GenericEndpoint.java:128)
  	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleRequest(RemoteEndpoint.java:265)
  	at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:195)
  	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(StreamMessageProducer.java:189)
  	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(StreamMessageProducer.java:97)
  	at org.eclipse.lsp4j.jsonrpc.json.ConcurrentMessageProcessor.run(ConcurrentMessageProcessor.java:97)
  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
  	at java.base/java.lang.Thread.run(Thread.java:1583)

@rubenporras rubenporras merged commit cb2863e into eclipse-lsp4e:main May 19, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants