Skip to content

Commit

Permalink
fix: corrected sonar issues
Browse files Browse the repository at this point in the history
Signed-off-by: Andre Dietisheim <[email protected]>
  • Loading branch information
adietish committed Oct 25, 2024
1 parent 1836155 commit c9af008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ open class ClientConfig(private val client: Client, private val executor: Execut
return@supplyAsync false
}
val fromFile = kubeConfig.load() ?: return@supplyAsync false
if (setCurrentContext(
return@supplyAsync if (setCurrentContext(
currentContext,
KubeConfigUtils.getCurrentContext(fromFile),
fromFile
Expand All @@ -66,9 +66,9 @@ open class ClientConfig(private val client: Client, private val executor: Execut
)
) {
kubeConfig.save(fromFile)
return@supplyAsync true
true
} else {
return@supplyAsync false
false
}
},
executor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import com.redhat.devtools.intellij.kubernetes.model.mocks.Mocks.clientConfig
import com.redhat.devtools.intellij.kubernetes.model.mocks.Mocks.clientFactory
import com.redhat.devtools.intellij.kubernetes.model.mocks.Mocks.context
import com.redhat.devtools.intellij.kubernetes.model.resource.ResourceKind
import com.redhat.devtools.intellij.kubernetes.model.util.ResourceException
import io.fabric8.kubernetes.api.model.Config
import io.fabric8.kubernetes.api.model.ConfigBuilder
import io.fabric8.kubernetes.api.model.HasMetadata
Expand Down

0 comments on commit c9af008

Please sign in to comment.