void (@NotNull GrReferenceExpression expression) { final PsiElement element = expression.resolve(); if (!(element instanceof PsiField field)) { return; } if (field.hasModifierProperty(PsiModifier.PRIVATE) || field.hasModifierProperty(PsiModifier.FINAL)) { return; } if (!isInSynchronizedContext(expression)) { return; } final PsiClass containingClass = field.getContainingClass(); if (containingClass.hasModifierProperty(PsiModifier.PRIVATE)) { return; } registerError(expression); }