boolean (final PsiParameter parameter, @Nullable final PsiCodeBlock catchBlock) { final boolean[] result = {true}; if (catchBlock != null) { catchBlock.accept(new JavaRecursiveElementWalkingVisitor() { @Override public void visitReferenceExpression(@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); if (expression.resolve() == parameter && PsiUtil.isAccessedForWriting(expression)) { result[0] = false; stopWalking(); } } }); } return result[0]; }