Merge stored empty lists and sets to singe object
This commit is contained in:
+4
-5
@@ -100,7 +100,7 @@ public abstract class LazyJavaMemberScope(
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList(functions)
|
||||
functions.toReadOnlyList()
|
||||
}
|
||||
|
||||
data class MethodSignatureData(
|
||||
@@ -237,8 +237,7 @@ public abstract class LazyJavaMemberScope(
|
||||
|
||||
computeNonDeclaredProperties(name, properties)
|
||||
|
||||
properties.trimToSize()
|
||||
properties
|
||||
properties.toReadOnlyList()
|
||||
}
|
||||
|
||||
private fun resolveProperty(field: JavaField): PropertyDescriptor {
|
||||
@@ -303,7 +302,7 @@ public abstract class LazyJavaMemberScope(
|
||||
override fun getOwnDeclaredDescriptors() = getAllDescriptors()
|
||||
override fun getAllDescriptors() = _allDescriptors()
|
||||
|
||||
private fun computeAllDescriptors(): MutableCollection<DeclarationDescriptor> {
|
||||
private fun computeAllDescriptors(): List<DeclarationDescriptor> {
|
||||
val result = LinkedHashSet<DeclarationDescriptor>()
|
||||
|
||||
for (name in getAllClassNames()) {
|
||||
@@ -324,7 +323,7 @@ public abstract class LazyJavaMemberScope(
|
||||
|
||||
addExtraDescriptors(result)
|
||||
|
||||
return ArrayList(result)
|
||||
return result.toReadOnlyList()
|
||||
}
|
||||
|
||||
protected open fun addExtraDescriptors(result: MutableSet<DeclarationDescriptor>) {
|
||||
|
||||
Reference in New Issue
Block a user