void () { String[] items = {""}; <warning descr="Cancellation check 'com.intellij.openapi.progress.ProgressManager.checkCanceled' should be the first statement in a loop body">for<caret></warning> (String item : items) { doSomething(); } }