diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt index 1199383dacc..769f70eed0b 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/compiler/KotlinCoreEnvironment.kt @@ -309,7 +309,7 @@ public class KotlinCoreEnvironment private constructor( if (ourApplicationEnvironment == null) return val environment = ourApplicationEnvironment ourApplicationEnvironment = null - Disposer.dispose(environment!!.getParentDisposable()) + Disposer.dispose(environment.getParentDisposable()) } } diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt index 95e87aee214..a9dab08c88b 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/JavaSyntheticPropertiesScope.kt @@ -359,7 +359,7 @@ class JavaSyntheticPropertiesScope(storageManager: StorageManager, private val l } val classParametersSubstitutor = TypeSubstitutor.create(substitutionMap) - descriptor.getMethod = getMethod.substitute(classParametersSubstitutor)!! + descriptor.getMethod = getMethod.substitute(classParametersSubstitutor) descriptor.setMethod = setMethod?.substitute(classParametersSubstitutor) return descriptor } diff --git a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/SamAdapterFunctionsScope.kt b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/SamAdapterFunctionsScope.kt index b7edf204101..3b63f4f1680 100644 --- a/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/SamAdapterFunctionsScope.kt +++ b/compiler/frontend.java/src/org/jetbrains/kotlin/synthetic/SamAdapterFunctionsScope.kt @@ -199,7 +199,7 @@ class SamAdapterFunctionsScope(storageManager: StorageManager) : BaseImportingSc } val sourceFunctionSubstitutor = TypeSubstitutor.create(substitutionMap) - descriptor.sourceFunction = original.sourceFunction.substitute(sourceFunctionSubstitutor)!! + descriptor.sourceFunction = original.sourceFunction.substitute(sourceFunctionSubstitutor) return descriptor } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt b/compiler/frontend/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt index 336cb16af80..ddf33fe7354 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/psiUtil/psiUtils.kt @@ -98,12 +98,12 @@ public fun PsiElement.getParentOfTypesAndPredicate( while (element != null) { @Suppress("UNCHECKED_CAST") when { - (parentClasses.isEmpty() || parentClasses.any { parentClass -> parentClass.isInstance(element) }) && predicate(element!! as T) -> - return element as T + (parentClasses.isEmpty() || parentClasses.any { parentClass -> parentClass.isInstance(element) }) && predicate(element as T) -> + return element element is PsiFile -> return null else -> - element = element!!.getParent() + element = element.getParent() } } diff --git a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/synthesizedInvokes.kt b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/synthesizedInvokes.kt index 7ece2ed57e9..4d104d936d4 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/synthesizedInvokes.kt +++ b/compiler/frontend/src/org/jetbrains/kotlin/resolve/calls/tasks/synthesizedInvokes.kt @@ -52,7 +52,7 @@ fun createSynthesizedInvokes(functions: Collection): Collect fakeOverride } - result.add(synthesized.substitute(TypeSubstitutor.create(invoke.getDispatchReceiverParameter()!!.getType()))!!) + result.add(synthesized.substitute(TypeSubstitutor.create(invoke.getDispatchReceiverParameter()!!.getType()))) } return result diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt b/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt index cf600d762c0..4a6eb946de6 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt +++ b/compiler/tests/org/jetbrains/kotlin/checkers/LazyOperationsLog.kt @@ -189,7 +189,7 @@ class LazyOperationsLog( }.appendQuoted() } o is ResolutionCandidate<*> -> DescriptorRenderer.COMPACT.render(o.getDescriptor()).appendQuoted() - o is ResolutionTaskHolder<*, *> -> o.field("basicCallResolutionContext").call.getCallElement().getDebugText()?.appendQuoted() + o is ResolutionTaskHolder<*, *> -> o.field("basicCallResolutionContext").call.getCallElement().getDebugText().appendQuoted() } return sb.toString() } diff --git a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt index 9519cbe3eda..61078077ddf 100644 --- a/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt +++ b/compiler/tests/org/jetbrains/kotlin/jvm/compiler/AbstractCompileKotlinAgainstInlineKotlinTest.kt @@ -54,10 +54,10 @@ public abstract class AbstractCompileKotlinAgainstInlineKotlinTest : AbstractCom catch (e: Throwable) { var result = "" if (factory1 != null) { - result += "FIRST: \n\n" + factory1!!.createText() + result += "FIRST: \n\n" + factory1.createText() } if (factory2 != null) { - result += "\n\nSECOND: \n\n" + factory2!!.createText() + result += "\n\nSECOND: \n\n" + factory2.createText() } System.out.println(result) throw e diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/intentions/SelfTargetingIntention.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/intentions/SelfTargetingIntention.kt index 0214903dfd5..779016c26d0 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/intentions/SelfTargetingIntention.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/intentions/SelfTargetingIntention.kt @@ -73,7 +73,7 @@ public abstract class SelfTargetingIntention( for (element in elementsToCheck) { @Suppress("UNCHECKED_CAST") if (elementType.isInstance(element) && isApplicableTo(element as TElement, offset)) { - return element as TElement + return element } if (!allowCaretInsideElement(element) && element.getTextRange().containsInside(offset)) break } diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt index 36dbe7e7c2e..7620773bab9 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/ExpectedInfos.kt @@ -342,7 +342,7 @@ class ExpectedInfos( val alreadyHasStar = argument.getSpreadElement() != null - val varargElementType = parameter!!.varargElementType + val varargElementType = parameter.varargElementType if (varargElementType != null) { if (isFunctionLiteralArgument) return @@ -356,16 +356,16 @@ class ExpectedInfos( } val starOptions = if (!alreadyHasStar) ItemOptions.STAR_PREFIX else ItemOptions.DEFAULT - add(ExpectedInfo.createForArgument(parameter!!.getType(), expectedName, varargTail, argumentPositionData, starOptions)) + add(ExpectedInfo.createForArgument(parameter.getType(), expectedName, varargTail, argumentPositionData, starOptions)) } else { if (alreadyHasStar) return val parameterType = if (useHeuristicSignatures) resolutionFacade.ideService(). - correctedParameterType(descriptor, parameter!!) ?: parameter!!.getType() + correctedParameterType(descriptor, parameter) ?: parameter.getType() else - parameter!!.getType() + parameter.getType() if (isFunctionLiteralArgument) { if (KotlinBuiltIns.isExactFunctionOrExtensionFunctionType(parameterType)) { diff --git a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinFunctionInsertHandler.kt b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinFunctionInsertHandler.kt index 49cf7d71b22..5e7e37b8b47 100644 --- a/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinFunctionInsertHandler.kt +++ b/idea/idea-completion/src/org/jetbrains/kotlin/idea/completion/handlers/KotlinFunctionInsertHandler.kt @@ -154,7 +154,7 @@ sealed class KotlinFunctionInsertHandler : KotlinCallableInsertHandler() { } if (insertLambda && lambdaInfo!!.explicitParameters) { - insertLambdaTemplate(context, TextRange(openingBracketOffset, closeBracketOffset!! + 1), lambdaInfo!!.lambdaType) + insertLambdaTemplate(context, TextRange(openingBracketOffset, closeBracketOffset!! + 1), lambdaInfo.lambdaType) return } diff --git a/idea/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt b/idea/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt index 6de8bd1effb..3f3f9edf83a 100644 --- a/idea/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt +++ b/idea/src/org/jetbrains/kotlin/idea/findUsages/handlers/KotlinFindMemberUsagesHandler.kt @@ -170,7 +170,7 @@ public abstract class KotlinFindMemberUsagesHandler return if (baseDeclarations.isNotEmpty()) { baseDeclarations.flatMap { val handler = (FindManager.getInstance(project) as FindManagerImpl).findUsagesManager.getFindUsagesHandler(it!!, true) - handler?.findReferencesToHighlight(it!!, searchScope) ?: emptyList() + handler?.findReferencesToHighlight(it, searchScope) ?: emptyList() } } else { diff --git a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightExitPointsHandlerFactory.kt b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightExitPointsHandlerFactory.kt index 175521ebaaa..dd6c5f0ae65 100644 --- a/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightExitPointsHandlerFactory.kt +++ b/idea/src/org/jetbrains/kotlin/idea/highlighter/KotlinHighlightExitPointsHandlerFactory.kt @@ -91,7 +91,7 @@ private fun KtExpression.getRelevantFunction(): KtFunction? { } for (parent in parents) { if (InlineUtil.canBeInlineArgument(parent) && !InlineUtil.isInlinedArgument(parent as KtFunction, parent.analyze(), false)) { - return parent as KtFunction + return parent } } return null diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createClass/createClassUtils.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createClass/createClassUtils.kt index eca7711e320..0c9fa2ab874 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createClass/createClassUtils.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createClass/createClassUtils.kt @@ -61,7 +61,7 @@ internal fun getTargetParentByQualifier( if (qualifierDescriptor.fqName != file.getPackageFqName()) { JavaPsiFacade.getInstance(project).findPackage(qualifierDescriptor.fqName.asString()) } - else file as PsiElement + else file as PsiElement // KT-9972 else -> null } ?: return null diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createVariable/CreateParameterByRefActionFactory.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createVariable/CreateParameterByRefActionFactory.kt index f1103f48ae3..b59e3d2b279 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createVariable/CreateParameterByRefActionFactory.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/createFromUsage/createVariable/CreateParameterByRefActionFactory.kt @@ -144,7 +144,7 @@ fun KotlinType.hasTypeParametersToAdd(functionDescriptor: FunctionDescriptor, co is FunctionDescriptor -> { val function = functionDescriptor.source.getPsi() as? KtFunction - function?.bodyExpression?.getResolutionScope(context, function!!.getResolutionFacade()) + function?.bodyExpression?.getResolutionScope(context, function.getResolutionFacade()) } else -> null diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/extractionEngine/extractorUtil.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/extractionEngine/extractorUtil.kt index b4a1ba5c950..0b5cf8be74c 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/extractionEngine/extractorUtil.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/extractionEngine/extractorUtil.kt @@ -553,7 +553,7 @@ fun ExtractionGeneratorConfiguration.generateDeclaration( if (!generatorOptions.inTempFile && defaultValue != null && descriptor.controlFlow.outputValueBoxer.boxingRequired && lastExpression!!.isMultiLine()) { val varNameValidator = NewDeclarationNameValidator(body, lastExpression, NewDeclarationNameValidator.Target.VARIABLES) val resultVal = KotlinNameSuggester.suggestNamesByType(defaultValue.valueType, varNameValidator, null).first() - val newDecl = body.addBefore(psiFactory.createDeclaration("val $resultVal = ${lastExpression!!.text}"), lastExpression) as KtProperty + val newDecl = body.addBefore(psiFactory.createDeclaration("val $resultVal = ${lastExpression.text}"), lastExpression) as KtProperty body.addBefore(psiFactory.createNewLine(), lastExpression) psiFactory.createExpression(resultVal) to newDecl.initializer!! } diff --git a/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceParameter/KotlinIntroduceParameterMethodUsageProcessor.kt b/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceParameter/KotlinIntroduceParameterMethodUsageProcessor.kt index 9e2ac36ec00..2c2d208acc6 100644 --- a/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceParameter/KotlinIntroduceParameterMethodUsageProcessor.kt +++ b/idea/src/org/jetbrains/kotlin/idea/refactoring/introduce/introduceParameter/KotlinIntroduceParameterMethodUsageProcessor.kt @@ -68,7 +68,7 @@ public class KotlinIntroduceParameterMethodUsageProcessor : IntroduceParameterMe data.getParametersToRemove().toNativeArray().sortedDescending().forEach { changeInfo.removeParameter(it) } // Temporarily assume that the new parameter is of Any type. Actual type is substituted during the signature update phase - val defaultValueForCall = (data.getParameterInitializer().getExpression()!! as? PsiExpression)?.let { it.j2k() } + val defaultValueForCall = (data.getParameterInitializer().getExpression() as? PsiExpression)?.let { it.j2k() } changeInfo.addParameter(KotlinParameterInfo(callableDescriptor = psiMethodDescriptor, name = data.getParameterName(), type = psiMethodDescriptor.builtIns.anyType, diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt index 42a08018848..960c1202827 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestBase.kt @@ -146,13 +146,13 @@ abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() { } protected fun SuspendContextImpl.doStepOut() { - val stepOutCommand = runReadAction { KotlinSteppingCommandProvider().getStepOutCommand(this, debuggerContext!!) } + val stepOutCommand = runReadAction { KotlinSteppingCommandProvider().getStepOutCommand(this, debuggerContext) } ?: dp.createStepOutCommand(this) dp.managerThread.schedule(stepOutCommand) } protected fun SuspendContextImpl.doStepOver() { - val stepOverCommand = runReadAction { KotlinSteppingCommandProvider().getStepOverCommand(this, false, debuggerContext!!) } + val stepOverCommand = runReadAction { KotlinSteppingCommandProvider().getStepOverCommand(this, false, debuggerContext) } ?: dp.createStepOverCommand(this, false) dp.managerThread.schedule(stepOverCommand) } diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt index 014d60dc172..309670a35fa 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/evaluate/AbstractKotlinEvaluateExpressionTest.kt @@ -223,7 +223,7 @@ public abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestB } fun getExtraVars(): Set { - return KotlinFrameExtraVariablesProvider().collectVariables(debuggerContext!!.getSourcePosition(), evaluationContext!!, hashSetOf())!! + return KotlinFrameExtraVariablesProvider().collectVariables(debuggerContext.getSourcePosition(), evaluationContext, hashSetOf()) } private inner class Printer() { @@ -264,11 +264,11 @@ public abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestB is StackFrameDescriptor -> logDescriptor(descriptor, "$curIndent frame = $label\n") is WatchItemDescriptor -> logDescriptor(descriptor, "$curIndent extra = ${descriptor.calcValueName()}\n") is LocalVariableDescriptor -> logDescriptor(descriptor, "$curIndent local = $label" - + " (sp = ${render(SourcePositionProvider.getSourcePosition(descriptor, myProject, debuggerContext!!))})\n") + + " (sp = ${render(SourcePositionProvider.getSourcePosition(descriptor, myProject, debuggerContext))})\n") is StaticDescriptor -> logDescriptor(descriptor, "$curIndent static = $label\n") is ThisDescriptorImpl -> logDescriptor(descriptor, "$curIndent this = $label\n") is FieldDescriptor -> logDescriptor(descriptor, "$curIndent field = $label" - + " (sp = ${render(SourcePositionProvider.getSourcePosition(descriptor, myProject, debuggerContext!!))})\n") + + " (sp = ${render(SourcePositionProvider.getSourcePosition(descriptor, myProject, debuggerContext))})\n") is MessageDescriptor -> logDescriptor(descriptor, "$curIndent - $label\n") else -> logDescriptor(descriptor, "$curIndent unknown = $label\n") } @@ -352,7 +352,7 @@ public abstract class AbstractKotlinEvaluateExpressionTest : KotlinDebuggerTestB val sourcePosition = ContextUtil.getSourcePosition(this) val contextElement = createContextElement(this) - contextElement.putCopyableUserData(KotlinCodeFragmentFactory.DEBUG_FRAME_FOR_TESTS, evaluationContext?.frameProxy) + contextElement.putCopyableUserData(KotlinCodeFragmentFactory.DEBUG_FRAME_FOR_TESTS, evaluationContext.frameProxy) try { diff --git a/idea/tests/org/jetbrains/kotlin/idea/run/RunConfigurationTest.kt b/idea/tests/org/jetbrains/kotlin/idea/run/RunConfigurationTest.kt index b8f1184af04..96389f5bef3 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/run/RunConfigurationTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/run/RunConfigurationTest.kt @@ -199,7 +199,7 @@ class RunConfigurationTest: KotlinCodeInsightTestCase() { val dataContext = MapDataContext() dataContext.put(Location.DATA_KEY, PsiLocation(getTestProject(), declaration)) val context = ConfigurationContext.getFromContext(dataContext) - val actualClass = (context?.getConfiguration()?.getConfiguration() as? JetRunConfiguration)?.getRunClass() + val actualClass = (context.getConfiguration()?.getConfiguration() as? JetRunConfiguration)?.getRunClass() if (actualClass != null) { actualClasses.add(actualClass) } @@ -229,7 +229,7 @@ class RunConfigurationTest: KotlinCodeInsightTestCase() { val dataContext = MapDataContext() dataContext.put(Location.DATA_KEY, PsiLocation(getTestProject(), element)) - val runnerAndConfigurationSettings = ConfigurationContext.getFromContext(dataContext)!!.getConfiguration() + val runnerAndConfigurationSettings = ConfigurationContext.getFromContext(dataContext).getConfiguration() if (save) { RunManagerEx.getInstanceEx(myProject).setTemporaryConfiguration(runnerAndConfigurationSettings) } diff --git a/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/AndroidXmlHandler.kt b/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/AndroidXmlHandler.kt index 46bb6615ac6..fad9efbc8a7 100644 --- a/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/AndroidXmlHandler.kt +++ b/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/AndroidXmlHandler.kt @@ -35,7 +35,7 @@ class AndroidXmlHandler(private val elementCallback: (String, String) -> Unit) : val attributesMap = attributes.toMap() val idAttribute = attributesMap[AndroidConst.ID_ATTRIBUTE_NO_NAMESPACE] val widgetType = attributesMap[AndroidConst.CLASS_ATTRIBUTE_NO_NAMESPACE] ?: localName - val name = idAttribute?.let { idToName(idAttribute!!) } + val name = idAttribute?.let { idToName(idAttribute) } if (name != null) elementCallback(name, widgetType) } diff --git a/plugins/android-idea-plugin/src/org/jetbrains/kotlin/android/synthetic/idea/AndroidRenameProcessor.kt b/plugins/android-idea-plugin/src/org/jetbrains/kotlin/android/synthetic/idea/AndroidRenameProcessor.kt index 123c5c3cde9..e04cb0496b1 100644 --- a/plugins/android-idea-plugin/src/org/jetbrains/kotlin/android/synthetic/idea/AndroidRenameProcessor.kt +++ b/plugins/android-idea-plugin/src/org/jetbrains/kotlin/android/synthetic/idea/AndroidRenameProcessor.kt @@ -132,8 +132,8 @@ public class AndroidRenameProcessor : RenamePsiElementProcessor() { oldPropName: String, processor: SyntheticFileGenerator ) { - val props = processor.getSyntheticFiles()?.flatMap { it.findChildrenByClass(javaClass()).toList() } - val matchedProps = props?.filter { it.getName() == oldPropName } ?: listOf() + val props = processor.getSyntheticFiles().flatMap { it.findChildrenByClass(javaClass()).toList() } + val matchedProps = props.filter { it.getName() == oldPropName } ?: listOf() for (prop in matchedProps) { allRenames[prop] = newPropName }