refactor: fix some kotlin warnings

This commit is contained in:
Akash Yadav
2023-10-12 23:22:14 +05:30
parent 1b1551f23b
commit 0b22af8993
3 changed files with 3 additions and 4 deletions
@@ -67,7 +67,7 @@ internal class ToolingServerRunner(
}
fun startAsync() = runnerScope.launch {
var process: Process? = null
var process: Process?
try {
log.info("Starting tooling API server...")
val command = listOf(
@@ -39,7 +39,7 @@ class TreeSitterLanguageSpec
// </editor-fold>
val indentsQuery: TSQuery? = TSQuery.create(language, indentsQueryScm)
.let { if (it.isValid) it else null }
.let { if (it.canAccess()) it else null }
init {
indentsQuery?.validateOrThrow(name = "indents")
@@ -83,7 +83,6 @@ import java.util.concurrent.CompletableFuture
* [libraryMap].
* @param libraryMap The map of libraries. Keys are the key field obtained from the GraphItem
* instance in the Tooling API implementation.
* @param dynamicFeatures The dynamic features.
* @param lintCheckJars The lint check jar files.
* @param modelSyncFiles The model sync files.
* @author Akash Yadav
@@ -358,7 +357,7 @@ open class AndroidModule( // Class must be open because BaseXMLTest mocks this..
/** Get the resource tables for external dependencies (not local module project dependencies). */
fun getDependencyResourceTables(): Set<ResourceTable> {
return mutableSetOf<ResourceTable>().also {
var deps = 0
var deps: Int
it.addAll(
libraryMap.values
.filter { library ->