Skip to content

Commit 94f5687

Browse files
committed
style(scanner): Shorten a null check
In exchange, use the longer but more readable `factory` lambda parameter name. Signed-off-by: Sebastian Schuberth <[email protected]>
1 parent c172fb6 commit 94f5687

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scanner/src/main/kotlin/storages/ClearlyDefinedStorage.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class ClearlyDefinedStorage(
113113
ScannerWrapper.ALL[name]?.let { factory ->
114114
val scanner = factory.create(emptyMap(), emptyMap())
115115
(scanner as? CommandLinePathScannerWrapper)?.let { cliScanner -> cliScanner to versions.last() }
116-
}.also {
117-
if (it == null) logger.debug { "Unsupported tool '$name' for coordinates '$coordinates'." }
116+
}.also { factory ->
117+
factory ?: logger.debug { "Unsupported tool '$name' for coordinates '$coordinates'." }
118118
}
119119
}
120120

0 commit comments

Comments
 (0)