Skip to content

Commit b2ce2cd

Browse files
committed
lsp: ignore client messages without methods
1 parent ddfd866 commit b2ce2cd

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/main/java/org/javacs/lsp/LSP.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ public void run() {
252252
// Otherwise, process the new message
253253
hasAsyncWork = true;
254254
try {
255+
if (r.method == null) {
256+
LOG.fine("Ignoring client message without method");
257+
continue;
258+
}
255259
switch (r.method) {
256260
case "initialize":
257261
{

0 commit comments

Comments
 (0)