Skip to content

Commit 291330c

Browse files
committed
Kotlin: Small code simplification
1 parent 74a4061 commit 291330c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

java/kotlin-extractor/src/main/kotlin/LinesOfCode.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,8 @@ class LinesOfCode(
1616
val tw: FileTrapWriter,
1717
val file: IrFile
1818
) {
19-
val psi2Ir = getPsi2Ir(logger)
20-
init {
21-
if (psi2Ir == null) {
19+
val psi2Ir = getPsi2Ir(logger).also {
20+
if (it == null) {
2221
logger.warn("Lines of code will not be populated as Kotlin version is too old (${KotlinCompilerVersion.getVersion()})")
2322
}
2423
}

0 commit comments

Comments
 (0)