From 2f68e43661e382f1fd9bc0cbb20d7e6cff302860 Mon Sep 17 00:00:00 2001 From: Bastian Doetsch Date: Wed, 23 Oct 2024 15:57:07 +0200 Subject: [PATCH] fix: remove unnecessary exception from log (#628) --- src/main/kotlin/snyk/common/lsp/LanguageServerWrapper.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/snyk/common/lsp/LanguageServerWrapper.kt b/src/main/kotlin/snyk/common/lsp/LanguageServerWrapper.kt index e7a1da038..5881abed5 100644 --- a/src/main/kotlin/snyk/common/lsp/LanguageServerWrapper.kt +++ b/src/main/kotlin/snyk/common/lsp/LanguageServerWrapper.kt @@ -589,9 +589,10 @@ class LanguageServerWrapper( val param = ExecuteCommandParams() param.command = COMMAND_CODE_FIX_DIFFS param.arguments = listOf(folderURI, fileURI, issueID) - val result = executeCommand(param, 120000) as List<*> - val diffList: MutableList = mutableListOf() + val executeCommandResult = executeCommand(param, 120000) ?: return emptyList() + val diffList: MutableList = mutableListOf() + val result = executeCommandResult as List<*> result.forEach { val entry = it as Map val fixId = entry["fixId"] as? String