private static boolean isCatchParameterEffectivelyFinal(final PsiParameter parameter, final @Nullable 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];
  }
private static boolean isCatchParameterEffectivelyFinal(final PsiParameter parameter, final @Nullable PsiCodeBlock catchBlock)