public Object setValue(Object ctx, Object elCtx, VariableResolverFactory variableFactory, Object value) {
    // this local field is required to make sure exception block works with the same coercionRequired value
    // and it is not changed by another thread while setter is invoked 
    boolean attemptedCoercion = coercionRequired;
    try {
      if (coercionRequired) {
        return method.invoke(ctx, convert(value, targetType));
      }
      else {
        return method.invoke(ctx, value == null && primitive ? PropertyTools.getPrimitiveInitialValue(targetType) : value);
      }
    }
    catch (IllegalArgumentException e) {
      if (ctx != null && method.getDeclaringClass() != ctx.getClass()) {
        Method o = getBestCandidate(EMPTY, method.getName(), ctx.getClass(), ctx.getClass().getMethods(), true);
        if (o != null) {
          return executeOverrideTarget(o, ctx, value);
        }
      }

      if (!attemptedCoercion) {
        coercionRequired = true;
        return setValue(ctx, elCtx, variableFactory, value);
      }
      throw new RuntimeException("unable to bind property", e);
    }
    catch (Exception e) {
      throw new RuntimeException("error calling method: " + method.getDeclaringClass().getName() + "." + method.getName(), e);
    }
  }