void (PsiExpression condition) { condition.accept(new JavaRecursiveElementVisitor() { @Override public void visitReferenceExpression(@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); if (ExpressionUtils.getArrayFromLengthExpression(expression) != null) { registerError(Objects.requireNonNull(expression.getReferenceNameElement())); } } }); }