Skip to content

Commit 32eba91

Browse files
committed
Clean up
1 parent 3687240 commit 32eba91

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

compose-stability-analyzer-idea/src/main/kotlin/com/skydoves/compose/stability/idea/k2/KtStabilityInferencer.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -612,14 +612,10 @@ internal class KtStabilityInferencer {
612612
context(KaSession)
613613
private fun KaClassSymbol.getStabilityInferredParameters(): Int? {
614614
val stabilityInferredFqName = "androidx.compose.runtime.internal.StabilityInferred"
615-
616-
// Find @StabilityInferred annotation
617615
val annotation = annotations.firstOrNull { annotation ->
618616
annotation.classId?.asSingleFqName()?.asString() == stabilityInferredFqName
619617
} ?: return null
620618

621-
// Try to read the 'parameters' field
622-
// The annotation has a single field: parameters: Int
623619
val parametersArgument = annotation.arguments.firstOrNull { arg ->
624620
arg.name.asString() == "parameters"
625621
}
@@ -630,17 +626,14 @@ internal class KtStabilityInferencer {
630626
is org.jetbrains.kotlin.analysis.api.annotations.KaAnnotationValue.ConstantValue -> {
631627
// Get the constant value as Int
632628
(expression.value.value as? Int) ?: run {
633-
// If we can't extract the value, be conservative and return null
634629
null
635630
}
636631
}
637632
else -> {
638-
// Unknown expression type, be conservative
639633
null
640634
}
641635
}
642636
} catch (e: Exception) {
643-
// If reading fails, be conservative and return null
644637
null
645638
}
646639
}

0 commit comments

Comments
 (0)