Skip to content

Commit cc1bc67

Browse files
Fix for java.util.NoSuchElementException (the issue is caused by migration kotlin 1.4.20 -> 1.7.10)
1 parent 1721fc3 commit cc1bc67

File tree

1 file changed

+1
-1
lines changed
  • utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/utils

1 file changed

+1
-1
lines changed

utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/utils/ModuleUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ private fun getOrCreateTestResourcesUrl(module: Module, testSourceRoot: VirtualF
180180
}
181181
// taking the source folder that has the maximum common prefix
182182
// with `testSourceRoot`, which was selected by the user
183-
.maxBy { sourceFolder ->
183+
.maxByOrNull { sourceFolder ->
184184
val sourceFolderPath = sourceFolder.file?.path ?: ""
185185
val testSourceRootPath = testSourceRoot?.path ?: ""
186186
sourceFolderPath.commonPrefixWith(testSourceRootPath).length

0 commit comments

Comments
 (0)