void (@NotNull GrSynchronizedStatement synchronizedStatement) { super.visitSynchronizedStatement(synchronizedStatement); final GrExpression lock = synchronizedStatement.getMonitor(); if (!(lock instanceof GrReferenceExpression)) { return; } final PsiElement referent = ((PsiReference) lock).resolve(); if (!(referent instanceof PsiField field)) { return; } if (field.hasModifierProperty(PsiModifier.FINAL)) { return; } registerError(lock); }