Fix perf test: `first` can't be null

GitOrigin-RevId: ab1d150d493bc49f14737eb7f4aeb43295a1cd4c
This commit is contained in:
Ilya.Kazakevich
2021-07-21 17:21:11 +00:00
committed by intellij-monorepo-bot
parent 89ab282508
commit b06e9cd7cb
@@ -81,7 +81,7 @@ fun openProjectWithSdk(projectPath: String,
}
fun getOrCreateModule(project: Project, projectPath: String, moduleTypeId: String): Module {
var module = ModuleManager.getInstance(project).modules.first()
var module = ModuleManager.getInstance(project).modules.firstOrNull()
if (module == null) {
module = runWriteAction {
ModuleManager.getInstance(project).newModule(projectPath, moduleTypeId)