Validates that the value is non-{@code null}, that is, the variable exists.

@param varValue the value of the variable to validate.
@throws ApiException if the value is {@code null}.
330891
private static void validateVarValue(String varValue) throws ApiException {
		if (varValue == null) {
			throw new ApiException(ApiException.Type.DOES_NOT_EXIST, PARAM_VAR_KEY);
		}
	}
834595
private static void checkPreconditions(final String trueValue, final String falseValue) {
		if( trueValue == null ) {
			throw new NullPointerException("trueValue should not be null");
		}
		if( falseValue == null ) {
			throw new NullPointerException("falseValue should not be null");
		}
	}
296498
protected boolean validate(T obj) throws ParameterException {
    if(constraints != null) {
      for(ParameterConstraint<? super T> cons : this.constraints) {
        cons.test(obj);
      }
    }
    return true;
  }
62443
@Nonnull
    public static <T> T checkNotNull(T value, @Nonnull String errorMessage) {
        if (value == null) {
            throw new NullPointerException(errorMessage);
        }
        return value;
    }
446861
static void throwMissingVariable(ViewDataBinding binding, int bindingVariable, @LayoutRes int layoutRes) {
        Context context = binding.getRoot().getContext();
        Resources resources = context.getResources();
        String layoutName = resources.getResourceName(layoutRes);
        String bindingVariableName = DataBindingUtil.convertBrIdToString(bindingVariable);
        throw new IllegalStateException("Could not bind variable '" + bindingVariableName + "' in layout '" + layoutName + "'");
    }
77737
public void setValue( Object value, int context )
        throws UtilEvalError
    {

        // prevent final variable re-assign
        if (hasModifier("final")) {
            if (this.value != null)
                throw new UtilEvalError("Cannot re-assign final variable "+name+".");
            if (value == null)
                return;
        }

        // TODO: should add isJavaCastable() test for strictJava
        // (as opposed to isJavaAssignable())
        if ( type != null && type != Object.class && value != null ) {
            this.value = Types.castObject( value, type,
                context == DECLARATION ? Types.CAST : Types.ASSIGNMENT
            );
            value = this.value;
        }

        this.value = value;

        if ( this.value == null && context != DECLARATION )
            this.value = Primitive.getDefaultValue( type );

        if ( lhs != null )
            this.value = lhs.assign( this.value, false/*strictjava*/ );

    }
517638
@Override
  public QueryBuilder<V> withBindVariableValue(String key, V value) {
    valueMap.put(key, value);
    return this;
  }
327248
public VarValueDef getValue( Object name)
    {
    int i = findValue( name);
    return i >= 0? values_.get(i) : null;
    }
1255959
@Override
    public void addVariable(String varName, Object value) {
        synchronized (mGlobalVariables) {
            mGlobalVariables.put(varName, value);
        }
        refreshGlobalBindings();
    }
1142166
public VarBindingDef bind( VarDef varDef, VarValueDef valueDef)
    {
    if( valueDef != null && !varDef.isApplicable( valueDef))
      {
      throw new IllegalArgumentException( "Value=" + valueDef + " is not defined for var=" + varDef);
      }
    
    varDef_ = varDef;
    valueDef_ = valueDef;
    effCondition_ = null;

    return this;
    }
1077737
public boolean isApplicable( VarValueDef value)
    {
    return
      value.isNA()
      ? isOptional()
      : getValue( value.getName()) != null;
    }
15351
@Override
  public final boolean isValid(final Object pvalue, final ConstraintValidatorContext pcontext) {
    if (pvalue == null) {
      return true;
    }
    try {
      final String field1Value =
          getDomainOf(BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, field1Name));
      final String field2Value =
          getDomainOf(BeanPropertyReaderUtil.getNullSaveStringProperty(pvalue, field2Name));
      if (!StringUtils.equals(field1Value, field2Value)) {
        switchContext(pcontext);
        return false;
      }
      return true;
    } catch (final Exception ignore) {
      switchContext(pcontext);
      return false;
    }
  }
1152852
protected void checkJavaSerialization(String variableName, TypedValue value) {
    ProcessEngineConfigurationImpl processEngineConfiguration = Context.getProcessEngineConfiguration();
    if (value instanceof SerializableValue && !processEngineConfiguration.isJavaSerializationFormatEnabled()) {

      SerializableValue serializableValue = (SerializableValue) value;

      // if Java serialization is prohibited
      if (!serializableValue.isDeserialized()) {

        String javaSerializationDataFormat = Variables.SerializationDataFormats.JAVA.getName();
        String requestedDataFormat = serializableValue.getSerializationDataFormat();

        if (requestedDataFormat == null) {
          // check if Java serializer will be used
          final TypedValueSerializer serializerForValue = TypedValueField.getSerializers()
              .findSerializerForValue(serializableValue, processEngineConfiguration.getFallbackSerializerFactory());
          if (serializerForValue != null) {
            requestedDataFormat = serializerForValue.getSerializationDataformat();
          }
        }

        if (javaSerializationDataFormat.equals(requestedDataFormat)) {
          throw ProcessEngineLogger.CORE_LOGGER.javaSerializationProhibitedException(variableName);
        }
      }
    }
  }
771225
<T> void setValueInternal(String key, T value) {
		if (key == null) {
			throw new NullPointerException("Key must not be null.");
		}
		if (value == null) {
			throw new NullPointerException("Value must not be null.");
		}

		synchronized (this.confData) {
			this.confData.put(key, value);
		}
	}
918191
public void rejectValue(final String errorCode, final Map<String, Object> variables) {

        final String codes[] = errors.generateMessageCodes(errorCode, fieldPath, fieldType);

        final FieldError error = new FieldErrorBuilder(errors.getObjectName(), fieldPath, codes)
            .sheetName(errors.getSheetName())
            .rejectedValue(fieldValue)
            .variables(variables)
            .address(position)
            .label(label)
            .build();

        errors.addError(error);
    }
248026
public static <V> void validateConfiguredValueType(Class<V> valueType, V value) throws ClassCastException {
        if (Object.class != valueType) {
            // means that type checks is required
            if (!valueType.isAssignableFrom(value.getClass())) {
                throw new ClassCastException("Value '" + value + "' is not assignable to " + valueType);
            }
        }
    }
864478
@Override
	public void setValue(StringValue value) {
		Validate.notNull(value);
		setValue(value.value, 0, value.len);
	}