Skip to content

Commit e148cbe

Browse files
Lightweight hashCode calc for LibraryInfo
#EA-6040509 Fixed #KTIJ-696 Fixed (cherry picked from commit bf9fa4c)
1 parent 36d91ae commit e148cbe

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

idea/idea-analysis/src/org/jetbrains/kotlin/idea/caches/project/IdeaModuleInfos.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,11 @@ abstract class LibraryInfo(override val project: Project, val library: Library)
386386
return (other is LibraryInfo && library == other.library)
387387
}
388388

389-
override fun hashCode(): Int = 43 * library.hashCode()
389+
private val lazyHashCode: Int by lazy {
390+
43 * library.hashCode()
391+
}
392+
393+
override fun hashCode(): Int = lazyHashCode
390394
}
391395

392396
data class LibrarySourceInfo(override val project: Project, val library: Library, override val binariesModuleInfo: BinaryModuleInfo) :

0 commit comments

Comments
 (0)