mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 18:17:08 +07:00
GitOrigin-RevId: 5bf28e687272eb39f9207989f9ef04a26acb2f27
17 lines
501 B
Java
17 lines
501 B
Java
package inspections.cancellationCheckInLoops;
|
|
|
|
import com.intellij.util.concurrency.annotations.RequiresReadLock;
|
|
|
|
import static inspections.cancellationCheckInLoops.Foo.doSomething;
|
|
|
|
|
|
class Clazz {
|
|
|
|
@RequiresReadLock
|
|
public static void foo() {
|
|
int i = 0;
|
|
<warning descr="Cancellation check 'com.intellij.openapi.progress.ProgressManager.checkCanceled' should be the first statement in a loop body">while<caret></warning> (i < 5) {
|
|
// check comments
|
|
}
|
|
}
|
|
} |