Skip to content

Commit a06bf75

Browse files
committed
Fix IndexOutOfBoundsException: Empty list doesn't contain element at index 3.
1 parent 4687415 commit a06bf75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/org/jetbrains/kotlin/test/helper/actions/GeneratedTestComboBoxAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ class GeneratedTestComboBoxAction(val baseEditor: TextEditor) : AbstractComboBox
158158

159159
internal fun executeRunConfigAction(e: AnActionEvent, index: Int) {
160160
if (project.hasGradleTestRunner(baseEditor.file)) {
161-
val className = methodsClassNames[currentChosenGroup]
161+
val className = methodsClassNames.elementAtOrNull(currentChosenGroup) ?: return
162162
project.service<TestDataRunnerService>()
163163
.collectAndRunAllTests(e, listOf(baseEditor.file), debug = index == 1, filterByClass = className)
164164
} else {

0 commit comments

Comments
 (0)