[SLC] SymbolLightModifierList: avoid redundant array allocation
^KTIJ-23783
This commit is contained in:
committed by
Space Team
parent
a7390d027a
commit
2ec09408d3
+1
-1
@@ -68,7 +68,7 @@ internal open class SymbolLightModifierList<out T : KtLightElement<KtModifierLis
|
||||
|
||||
override val givenAnnotations: List<KtLightAbstractAnnotation> get() = invalidAccess()
|
||||
|
||||
override fun getAnnotations(): Array<out PsiAnnotation> = lazyAnnotations?.value?.toTypedArray().orEmpty()
|
||||
override fun getAnnotations(): Array<out PsiAnnotation> = lazyAnnotations?.value?.toTypedArray() ?: PsiAnnotation.EMPTY_ARRAY
|
||||
override fun findAnnotation(qualifiedName: String): PsiAnnotation? =
|
||||
lazyAnnotations?.value?.firstOrNull { it.qualifiedName == qualifiedName }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user