diff --git a/src/main/kotlin/io/snyk/plugin/services/SnykCliAuthenticationService.kt b/src/main/kotlin/io/snyk/plugin/services/SnykCliAuthenticationService.kt index 0f9f7e71a..737931bb8 100644 --- a/src/main/kotlin/io/snyk/plugin/services/SnykCliAuthenticationService.kt +++ b/src/main/kotlin/io/snyk/plugin/services/SnykCliAuthenticationService.kt @@ -54,7 +54,6 @@ class SnykCliAuthenticationService(val project: Project) { private fun downloadCliIfNeeded() { val downloadCliTask: () -> Unit = { if (!getCliFile().exists()) { - val currentIndicator = ProgressManager.getInstance().progressIndicator getSnykTaskQueueService(project)?.downloadLatestRelease() } else { logger.debug("Skip CLI download, since it was already downloaded") diff --git a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/nodes/leaf/SuggestionTreeNode.kt b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/nodes/leaf/SuggestionTreeNode.kt index a4c9ea034..628cef49d 100644 --- a/src/main/kotlin/io/snyk/plugin/ui/toolwindow/nodes/leaf/SuggestionTreeNode.kt +++ b/src/main/kotlin/io/snyk/plugin/ui/toolwindow/nodes/leaf/SuggestionTreeNode.kt @@ -20,6 +20,7 @@ class SuggestionTreeNode( override val navigateToSource: () -> Unit ) : DefaultMutableTreeNode(Pair(suggestion, rangeIndex)), NavigatableToSourceTreeNode, DescriptionHolderTreeNode { + @Suppress("UNCHECKED_CAST") override fun getDescriptionPanel(logEventNeeded: Boolean): IssueDescriptionPanelBase { if (logEventNeeded) getSnykAnalyticsService().logIssueInTreeIsClicked( IssueInTreeIsClicked.builder() diff --git a/src/main/kotlin/snyk/PluginInformation.kt b/src/main/kotlin/snyk/PluginInformation.kt index 75069aefa..42b951c90 100644 --- a/src/main/kotlin/snyk/PluginInformation.kt +++ b/src/main/kotlin/snyk/PluginInformation.kt @@ -26,7 +26,7 @@ private fun getPluginInformation(): PluginInformation { return PluginInformation( integrationName = "JETBRAINS_IDE", integrationVersion = snykPluginVersion, - integrationEnvironment = integrationEnvironment.toUpperCase(), + integrationEnvironment = integrationEnvironment.uppercase(), integrationEnvironmentVersion = applicationInfo.fullVersion ) } diff --git a/src/main/kotlin/snyk/common/UIComponentFinder.kt b/src/main/kotlin/snyk/common/UIComponentFinder.kt index 4c247f5f4..75a7dea5b 100644 --- a/src/main/kotlin/snyk/common/UIComponentFinder.kt +++ b/src/main/kotlin/snyk/common/UIComponentFinder.kt @@ -7,11 +7,10 @@ import kotlin.reflect.cast object UIComponentFinder { - @OptIn(ExperimentalStdlibApi::class) fun getComponentByName(parent: Container, clazz: KClass, name: String? = null): T? = getComponentByCondition(parent, clazz) { name == null || name == it.name } - @OptIn(ExperimentalStdlibApi::class) + @Suppress("UNCHECKED_CAST") fun getComponentByCondition(parent: Container, clazz: KClass, condition: (T) -> Boolean): T? { val components = parent.components var found: T? = null diff --git a/src/main/kotlin/snyk/common/lsp/LanguageServerSettings.kt b/src/main/kotlin/snyk/common/lsp/LanguageServerSettings.kt index 5e0908ac6..6700acabf 100644 --- a/src/main/kotlin/snyk/common/lsp/LanguageServerSettings.kt +++ b/src/main/kotlin/snyk/common/lsp/LanguageServerSettings.kt @@ -4,7 +4,7 @@ package snyk.common.lsp import com.google.gson.annotations.SerializedName import io.snyk.plugin.pluginSettings -import org.apache.commons.lang.SystemUtils +import org.apache.commons.lang3.SystemUtils import snyk.pluginInfo data class LanguageServerSettings(