mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[java-inspections] IDEA-364908 WhileLoopSpinsOnField doesn't recognize lock
(cherry picked from commit 7a9fb186e4c23bf81a57cf1766a22cd6f85b5097) IJ-CR-152528 GitOrigin-RevId: 0c49f423e2043958a2b11a95244f58b8e7323085
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bdd037015a
commit
d08daf82f5
@@ -88,7 +88,9 @@ public final class WhileLoopSpinsOnFieldInspection extends BaseInspection {
|
||||
final PsiExpression condition = statement.getCondition();
|
||||
final PsiField field = getFieldIfSimpleFieldComparison(condition);
|
||||
if (field == null) return;
|
||||
if (body != null && (VariableAccessUtils.variableIsAssigned(field, body) || containsCall(body, ThreadingUtils::isWaitCall))) {
|
||||
if (body != null &&
|
||||
(VariableAccessUtils.variableIsAssigned(field, body) ||
|
||||
containsCall(body, expression -> ThreadingUtils.isWaitCall(expression) || ThreadingUtils.isAwaitCall(expression)))) {
|
||||
return;
|
||||
}
|
||||
boolean java9 = PsiUtil.isLanguageLevel9OrHigher(field);
|
||||
|
||||
Reference in New Issue
Block a user