Fix deprecated Interner/StringInterner usages after update to 202

This commit is contained in:
Alexander Udalov
2020-12-10 17:48:05 +01:00
parent f8c2f4a8d0
commit 8ae19f5cd7
8 changed files with 47 additions and 16 deletions
@@ -5,10 +5,8 @@
package org.jetbrains.kotlin.descriptors.commonizer.utils
import com.intellij.util.containers.WeakInterner
class Interner<T : Any> {
private val pool = WeakInterner<T>()
private val pool = com.intellij.util.containers.Interner.createWeakInterner<T>()
fun intern(value: T): T = pool.intern(value)
}
@@ -0,0 +1,14 @@
/*
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.descriptors.commonizer.utils
import com.intellij.util.containers.WeakInterner
class Interner<T : Any> {
private val pool = WeakInterner<T>()
fun intern(value: T): T = pool.intern(value)
}