mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
- Added support for forEach() and similar methods, and ContainerUtil.process() GitOrigin-RevId: fc9b66f3584cf94d603d9a84825f4142de92544d
17 lines
517 B
Java
17 lines
517 B
Java
package inspections.cancellationCheckInLoops;
|
|
|
|
import com.intellij.util.concurrency.annotations.RequiresReadLock;
|
|
import java.util.List;
|
|
|
|
import static inspections.cancellationCheckInLoops.Foo.doSomething;
|
|
|
|
class Clazz {
|
|
|
|
@RequiresReadLock
|
|
public static void foo(List<String> iterable) {
|
|
iterable.<warning descr="Cancellation check 'com.intellij.openapi.progress.ProgressManager.checkCanceled' should be the first statement in a loop body">for<caret>Each</warning>(e -> {
|
|
doSomething();
|
|
});
|
|
}
|
|
}
|