Cleanup RC deprecations in compiler and plugin.
This commit is contained in:
+1
-1
@@ -80,7 +80,7 @@ class LazyJavaAnnotationDescriptor(
|
||||
val constructors = getAnnotationClass().constructors
|
||||
if (constructors.isEmpty()) return mapOf()
|
||||
|
||||
val nameToArg = javaAnnotation.arguments.toMapBy { it.name }
|
||||
val nameToArg = javaAnnotation.arguments.associateBy { it.name }
|
||||
|
||||
return constructors.first().valueParameters.keysToMapExceptNulls { valueParameter ->
|
||||
var javaAnnotationArgument = nameToArg[valueParameter.getName()]
|
||||
|
||||
+2
-2
@@ -604,11 +604,11 @@ class LazyJavaClassMemberScope(
|
||||
}
|
||||
|
||||
private val nestedClassIndex = c.storageManager.createLazyValue {
|
||||
jClass.innerClasses.toMapBy { c -> c.name }
|
||||
jClass.innerClasses.associateBy { c -> c.name }
|
||||
}
|
||||
|
||||
private val enumEntryIndex = c.storageManager.createLazyValue {
|
||||
jClass.fields.filter { it.isEnumEntry }.toMapBy { f -> f.name }
|
||||
jClass.fields.filter { it.isEnumEntry }.associateBy { f -> f.name }
|
||||
}
|
||||
|
||||
private val nestedClasses = c.storageManager.createMemoizedFunctionWithNullableValues {
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ open class ClassMemberIndex(val jClass: JavaClass, val memberFilter: (JavaMember
|
||||
}
|
||||
|
||||
private val methods = jClass.methods.asSequence().filter(methodFilter).groupBy { m -> m.name }
|
||||
private val fields = jClass.fields.asSequence().filter(memberFilter).toMapBy { m -> m.name }
|
||||
private val fields = jClass.fields.asSequence().filter(memberFilter).associateBy { m -> m.name }
|
||||
|
||||
override fun findMethodsByName(name: Name): Collection<JavaMethod> = methods[name] ?: listOf()
|
||||
override fun getMethodNames(nameFilter: (Name) -> Boolean): Collection<Name> =
|
||||
|
||||
@@ -131,7 +131,7 @@ class JvmNameResolver(
|
||||
"kotlin/collections/ListIterator", "kotlin/collections/MutableListIterator"
|
||||
)
|
||||
|
||||
private val PREDEFINED_STRINGS_MAP = PREDEFINED_STRINGS.withIndex().toMapBy({ it.value }, { it.index })
|
||||
private val PREDEFINED_STRINGS_MAP = PREDEFINED_STRINGS.withIndex().associateBy({ it.value }, { it.index })
|
||||
|
||||
fun getPredefinedStringIndex(string: String): Int? = PREDEFINED_STRINGS_MAP[string]
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class KotlinClassHeader(
|
||||
MULTIFILE_CLASS_PART(5);
|
||||
|
||||
companion object {
|
||||
private val entryById = values().toMapBy(Kind::id)
|
||||
private val entryById = values().associateBy(Kind::id)
|
||||
|
||||
@JvmStatic
|
||||
fun getById(id: Int) = entryById[id] ?: UNKNOWN
|
||||
|
||||
Reference in New Issue
Block a user