Files
openide/plugins/devkit/devkit-kotlin-tests/testData/inspections/insertCancellationCheckFix/EmptyIteratorForEachRemainingMethod.kt
Karol Lewandowski bf33f56ded IDEA-330739: Devkit: extend "Cancellation check in loops" inspection
- Added support for forEach() and similar methods, and ContainerUtil.process()

GitOrigin-RevId: fc9b66f3584cf94d603d9a84825f4142de92544d
2024-02-08 19:53:11 +00:00

10 lines
425 B
Kotlin

package inspections.insertCancellationCheckFix
import com.intellij.util.concurrency.annotations.RequiresReadLock
import inspections.cancellationCheckInLoops.Foo.doSomething
@RequiresReadLock
fun main(iterator: Iterator<String>) {
iterator.<warning descr="Cancellation check 'com.intellij.openapi.progress.ProgressManager.checkCanceled' should be the first statement in a loop body">for<caret>EachRemaining</warning> {}
}