IJPL-233389 [UI]: Fix IndexOutOfBoundsException in IdeErrorsDialog

Add bounds checking to myIndex setter to prevent invalid index values

GitOrigin-RevId: ef7a1279e9ec95fd743b8285a1f9d7b78469802f
This commit is contained in:
Dmitry Yudin
2026-02-06 13:05:46 +00:00
committed by intellij-monorepo-bot
parent 06b7118c04
commit 3b1038f831
@@ -116,7 +116,10 @@ open class IdeErrorsDialog @ApiStatus.Internal @JvmOverloads constructor(
) : DialogWrapper(myProject, true), MessagePoolListener, UiDataProvider {
private val myAcceptedNotices: MutableSet<String>
private val myMessageClusters: MutableList<MessageCluster> = ArrayList() // exceptions with the same stacktrace
private var myIndex: Int
private var myIndex: Int = 0
set(value) {
field = value.coerceIn(0, (myMessageClusters.size - 1).coerceAtLeast(0))
}
private var myLastIndex = -1
private var myUpdateControlsJob: Job = SupervisorJob()