Skip to content

Commit

Permalink
Lightweight hashCode calc for LibraryInfo
Browse files Browse the repository at this point in the history
#EA-6040509 Fixed
  • Loading branch information
vladimirdolzhenko committed Feb 13, 2021
1 parent 6882cf8 commit bf9fa4c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,11 @@ abstract class LibraryInfo(override val project: Project, val library: Library)
return (other is LibraryInfo && library == other.library)
}

override fun hashCode(): Int = 43 * library.hashCode()
private val lazyHashCode: Int by lazy {
43 * library.hashCode()
}

override fun hashCode(): Int = lazyHashCode
}

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

0 comments on commit bf9fa4c

Please sign in to comment.