From f348f56a0b2cf231bc9277b6504562ffe9b40742 Mon Sep 17 00:00:00 2001 From: Nikolay Krasko Date: Wed, 9 Sep 2015 17:20:48 +0300 Subject: [PATCH] Pre-count and store fqname to avoid read-action requiment in equals and hashCode (EA-72806) --- .../resolve/KotlinLightClassForDecompiledDeclaration.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinLightClassForDecompiledDeclaration.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinLightClassForDecompiledDeclaration.kt index 3dfe85655bf..cd76dc82de7 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinLightClassForDecompiledDeclaration.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/resolve/KotlinLightClassForDecompiledDeclaration.kt @@ -26,6 +26,8 @@ class KotlinLightClassForDecompiledDeclaration( private val clsClass: ClsClassImpl, private val origin: JetClassOrObject? ) : KotlinWrappingLightClass(clsClass.getManager()) { + val _fqName = origin?.getFqName() ?: FqName(clsClass.getQualifiedName()) + override fun copy() = this override fun getOwnInnerClasses(): List { @@ -42,7 +44,7 @@ class KotlinLightClassForDecompiledDeclaration( override fun getOrigin() = origin - override fun getFqName() = origin?.getFqName() ?: FqName(clsClass.getQualifiedName()) + override fun getFqName() = _fqName override fun equals(other: Any?): Boolean = other is KotlinLightClassForDecompiledDeclaration &&