mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-30 16:21:49 +07:00
- Added support for forEach() and similar methods, and ContainerUtil.process() GitOrigin-RevId: fc9b66f3584cf94d603d9a84825f4142de92544d
18 lines
384 B
Java
18 lines
384 B
Java
package inspections.cancellationCheckInLoops;
|
|
|
|
import com.intellij.openapi.progress.ProgressManager;
|
|
import com.intellij.util.concurrency.annotations.RequiresReadLock;
|
|
import java.util.List;
|
|
|
|
|
|
class Clazz {
|
|
|
|
@RequiresReadLock
|
|
public static void foo(List<String> iterable) {
|
|
iterable.forEach(e -> {
|
|
ProgressManager.checkCanceled();
|
|
// empty block
|
|
});
|
|
}
|
|
}
|