Sets parallel parameter to null if the parameter is different from null
and prints a warning.

This method is written in Shanghai'14.
977933
private static void updateParallel(Object mojo) throws Exception {
        try {
            String currentParallel = getStringField(PARALLEL_FIELD, mojo);
            if (currentParallel != null) {
                warn(mojo, "Ekstazi does not support parallel parameter.  This parameter will be set to null for this run.");
                setField(PARALLEL_FIELD, mojo, null);
            }
        } catch (NoSuchMethodException ex) {
            // "parallel" was introduced in Surefire 2.2, so methods
            // may not exist, but we do not fail because default is
            // sequential execution.
        }
    }
104238
public SingleOutputStreamOperator<T> setParallelism(int parallelism) {
		Preconditions.checkArgument(canBeParallel() || parallelism == 1,
				"The parallelism of non parallel operator must be 1.");

		transformation.setParallelism(parallelism);

		return this;
	}
265437
private String ifNull(){

        if(params.length != 2){
            throw new IllegalArgumentException("Wrong number of Parameters for if null expression");
        }

        final String field1 = record.getValueByFieldName(params[0]);
        if (!field1.isEmpty()){
            return field1;
        }
        final String field2 = record.getValueByFieldName(params[1]);
        return field2;
    }
94809
protected void setParameter( PreparedStatement pPreparedStatement ) throws SQLException
  {
    if( _parameters != null )
    {
      for( int i = 0; i < _parameters.size(); i++ )
      {
        pPreparedStatement.setObject( i + 1, _parameters.get( i ) );
      }
    }
  }
1351548
public static void validateNotNull( Object object, String identifier )
        throws PreConditionException
    {
        if( object == null )
        {
            throw new PreConditionException( identifier + " was NULL." );
        }
    }
746817
@Override
    public String setParameterValue(String parameterName, String parameterValue) {
        // don't try to store a null value
        if (parameterValue == null) return null;
        return (String) parameters.put(parameterName, parameterValue);
    }
310068
@Override
    public void setNString(String parameterName, String value) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
593738
public synchronized void setSuccess(Res paramResult) {
        if (done)
            return; // can't mark done twice
        result = paramResult;
        done = true;
        notifyAll();

        // if we have a callback to call, schedule
        // it on a different thread. Who knows what this
        // thread is doing.
        if (callback != null) {
            QueueBuffer.executor.submit(new Callable<Void>() {
                public Void call() throws Exception {
                    callback.onSuccess(result);
                    return null;
                }
            });

        }
    }
976652
@SuppressWarnings("unchecked")
    @Override
    public S parallel() {
        context = context.parallel();
        if (stream != null)
            stream = stream.parallel();
        return (S) this;
    }
928330
public static <T> T checkNotNull (T value, String param)
    {
        if (value == null) {
            throw new NullPointerException("Must supply non-null '" + param + "'.");
        }
        return value;
    }
1271046
public boolean validation() throws ParallelTaskInvalidException {

        if (this.getAsyncHttpClient() == null) {
            logger.info("USE DEFAULT HTTP CLIENT: Did not set special asyncHttpClient, will use the current default one: "
                    + HttpClientStore.getInstance()
                            .getHttpClientTypeCurrentDefault().toString());
            this.asyncHttpClient = HttpClientStore.getInstance()
                    .getCurrentDefaultClient();
        }
        
        if (this.getHttpMethod() == null)
            throw new ParallelTaskInvalidException("Missing getHttpMethod!");
        if (this.getHeaderMetadata() == null) {
            logger.info("USE DEFAULT EMPTY HEADER: Did not specify HTTP header. Will use empty header."
                    + " Use .setHeaders to add headers");
            this.setHeaderMetadata(new ParallecHeader());
        }
        // if null it is OK, just set as the default
        if (this.getEntityBody() == null)
                               setEntityBody(PcConstants.COMMAND_VAR_DEFAULT_REQUEST_CONTENT);

        if (this.getRequestPort() == null) {
            setRequestPort("80");
            logger.info("USE DEFAULT PORT: Missing port. SET default port to be 80");
        }

        if (this.getRequestUrlPostfix() == null
                || this.getRequestUrlPostfix().trim().isEmpty()) {
            setRequestUrlPostfix("");
            logger.info("USE DEFAULT URL: RequestUrlPostfix is null or empty. SET as empty \"\". e.g. just want to GET http://parallec.io");
        }
        if (this.isPollable() &&
                this.getHttpPollerProcessor() == null) {
                throw new ParallelTaskInvalidException(
                        "set pollable but httpPollerProcessor is null!! Invalid. please set httpPollerProcessor() ");
        }

        return true;

    }
208915
public void setNullValue(String nullValue) {
        this.nullValue = nullValue;
        this.nullValueChars = nullValue.toCharArray();
        this.nullValueBytes = toBytes(nullValue, nullValue);
    }
369671
private void setNonEmptyStringParameter(String key, String value){
        if (value == null){
            parameters.remove(key);
        }
        else if (value.length() == 0){
            throw new IllegalArgumentException("Value cannot be empty.");
        }
        else{
            parameters.put(key, value);
        }
    }
890587
public static void parametersNotNull(final String names, final Object... objects) {
        String msgPrefix = "At least one of the parameters";

        if (objects != null) {
            if (objects.length == 1) {
                msgPrefix = "Parameter";
            }

            for (final Object object : objects) {
                if (object == null) {
                    raiseError(String.format("%s '%s' is null.", msgPrefix, names));
                }
            }
        }
    }
539268
public static void empty(String parameter, String name) {
		if (parameter == null || !parameter.isEmpty()) {
			throw new IllegalArgumentException(name + " is null or not empty.");
		}
	}
663286
public static <T> void checkEachParameterNotNull(final String name,
                                                     final T... parameters) {
        if (parameters == null) {
            throw new IllegalArgumentException("Parameter named '" + name + "' should be not null!");
        }
        for (final Object parameter : parameters) {
            if (parameter == null) {
                throw new IllegalArgumentException("Parameter named '" + name + "' should be not null!");
            }
        }
    }
573610
public static void doSetNullIsFirstRecursively(ComparatorItem comparatorItem,
      boolean nullIsFirst) {
    ComparatorItem tmp = comparatorItem;
    while (tmp != null) {
      tmp.setNullIsFirst(nullIsFirst);
      tmp = tmp.getNextComparatorItem();
    }
  }