[Low Level FIR] fix CME in java enhancement

Now all computations in FirThreadSafeCache are performed under lock

^KTIJ-23081 fixed
This commit is contained in:
Ilya Kirillov
2022-09-29 11:57:24 +02:00
parent fc1eb02590
commit e5a941030b
@@ -19,6 +19,6 @@ internal inline fun <KEY : Any, RESULT> ConcurrentMap<KEY, Any>.getOrPutWithNull
key: KEY,
crossinline compute: (KEY) -> Any?
): RESULT {
val value = getOrPut(key) { compute(key) ?: NullValue }
val value = computeIfAbsent(key) { compute(key) ?: NullValue }
return value.nullValueToNull()
}