Avoid redundant allocation on each collection chain transformation
This commit is contained in:
committed by
Yan Zhulanow
parent
ac19f30ed3
commit
64dec10bd5
+2
-1
@@ -16,8 +16,9 @@ import org.jetbrains.kotlin.types.KotlinType
|
||||
* @author Vitaliy.Bibaev
|
||||
*/
|
||||
class CollectionChainTransformer : ChainTransformer<KtCallExpression> {
|
||||
private val transformer = KotlinChainTransformerImpl(KotlinCollectionsTypeExtractor())
|
||||
|
||||
override fun transform(chainCalls: List<KtCallExpression>, context: PsiElement): StreamChain {
|
||||
val transformer = KotlinChainTransformerImpl(KotlinCollectionsTypeExtractor())
|
||||
val chain = transformer.transform(chainCalls, context)
|
||||
|
||||
if (chainCalls.first().resolveType().isArray) {
|
||||
|
||||
Reference in New Issue
Block a user