@Override
    public void visitSynchronizedStatement(@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 GrVariable variable) {
        final GrExpression initializer = variable.getInitializerGroovy();
        if (initializer == null) {
          return;
        }
        if (!(initializer instanceof GrLiteral)) {
          return;
        }
        registerError(lock);
      } else if (referent instanceof PsiVariable variable) {
        final PsiExpression initializer = variable.getInitializer();
        if (initializer == null) {
          return;
        }
        if (!(initializer instanceof PsiLiteralExpression)) {
          return;
        }
        registerError(lock);
      }
    }
@Override
    public void visitSynchronizedStatement(@NotNull GrSynchronizedStatement synchronizedStatement)