protected static Value preprocessValue(EvaluationContextImpl context, Value value, @NotNull Type varType) throws EvaluateException {
    if (value != null && JAVA_LANG_STRING.equals(varType.name()) && !(value instanceof StringReference)) {
      String v = DebuggerUtils.getValueAsString(context, value);
      if (v != null) {
        value = DebuggerUtilsEx.mirrorOfString(v, context.getSuspendContext().getVirtualMachine(), context);
      }
    }
    if (value instanceof DoubleValue) {
      double dValue = ((DoubleValue)value).doubleValue();
      if (varType instanceof FloatType && Float.MIN_VALUE <= dValue && dValue <= Float.MAX_VALUE) {
        value = context.getSuspendContext().getVirtualMachine().mirrorOf((float)dValue);
      }
    }
    if (value != null) {
      if (varType instanceof PrimitiveType) {
        if (!(value instanceof PrimitiveValue)) {
          value = (Value)UnBoxingEvaluator.unbox(value, context);
        }
      }
      else if (varType instanceof ReferenceType) {
        if (value instanceof PrimitiveValue) {
          value = (Value)BoxingEvaluator.box(value, context);
        }
      }
    }
    return value;
  }
protected static Value preprocessValue(EvaluationContextImpl context, Value value, @NotNull Type varType)