[stats-collector] EA-215204 assert: LookupEntryInfo.calculateDiff (do not rely on that lookup string value is stable)

GitOrigin-RevId: 4fa2ac4d166868f661c541e8c1a1ef4df2b4f7cb
This commit is contained in:
Vitaliy.Bibaev
2019-10-24 05:04:33 +00:00
committed by intellij-monorepo-bot
parent bd44e6849b
commit 7dfc47bfba
@@ -21,7 +21,7 @@ class LookupEntryInfo(val id: Int, val length: Int, val hash: Int, val relevance
// returns null if no difference found
fun calculateDiff(newValue: LookupEntryInfo): LookupEntryDiff? {
assert(id == newValue.id) { "Could not compare infos for different lookup elements" }
assert(hash == newValue.hash) { "Hashes of elements with the same ids should be the same" }
//assert(hash == newValue.hash) { "Hashes of elements with the same ids should be the same" } // lookupString is not actually stable
if (this === newValue) return null
if (relevance == null && newValue.relevance == null) {
return null