List of usage examples for org.apache.commons.lang Validate notNull
public static void notNull(Object object)
Validate an argument, throwing IllegalArgumentException
if the argument is null
.
Validate.notNull(myObject);
The message in the exception is 'The validated object is null'.
From source file:com.vmware.identity.sts.ws.WSFaultException.java
public WSFaultException(FaultKey key, String message) { super(message); Validate.notNull(key); Validate.notEmpty(message); this.key = key; }
From source file:com.relicum.ipsum.Locale.LocaleManager.java
public LocaleManager(Plugin p) { Validate.notNull(p); String[] l = p.getConfig().getString("locale", "en_GB").split("_"); setLocale(l[0], l[1]);//from www. j a v a 2 s .co m if (p.getConfig().getBoolean("messages.saveFiles") && !p.getConfig().getBoolean("messages.devMode")) { saveToDisk(p); p.getConfig().set("messages.saveFiles", false); } p.getLogger().info("Language locale has been set to " + Locale.getDefault().toLanguageTag()); }
From source file:com.opengamma.analytics.math.rootfinding.newton.InverseJacobianEstimateInitializationFunction.java
@Override public DoubleMatrix2D getInitializedMatrix(final Function1D<DoubleMatrix1D, DoubleMatrix2D> jacobianFunction, final DoubleMatrix1D x) { Validate.notNull(jacobianFunction); Validate.notNull(x);/*from www . j a v a2 s . c om*/ final DoubleMatrix2D estimate = jacobianFunction.evaluate(x); final DecompositionResult decompositionResult = _decomposition.evaluate(estimate); return decompositionResult.solve(DoubleMatrixUtils.getIdentityMatrix2D(x.getNumberOfElements())); }
From source file:ar.com.zauber.commons.dao.resources.StringResource.java
/** @param content resource content */ public StringResource(final String content) { Validate.notNull(content); this.content = content; }
From source file:ar.com.zauber.commons.spring.beans.factory.impl.BooleanPropertyCaseBlock.java
/** constructs */ public BooleanPropertyCaseBlock(final boolean b, final Object object) { Validate.notNull(object); this.b = b;// w ww .jav a 2 s. co m this.object = object; }
From source file:jp.tricreo.ddd.base.model.impl.AbstractEntity.java
/** * ?? * * @param identifier {@link Identifier} */ protected AbstractEntity(Identifier identifier) { Validate.notNull(identifier); this.identifier = identifier; }
From source file:com.gmail.gkovalechyn.automaticevents.parsing.ILocation.java
@Override public void setValue(Object value) { Validate.notNull(value); if (!(value instanceof Location)) { throw new IllegalArgumentException("Incompatible types: Location and " + value.getClass()); } else {/*from www.j av a2s . c o m*/ this.value = value; } }
From source file:com.alibaba.cobar.client.router.rules.ibatis.IBatisSqlActionRule.java
public boolean isDefinedAt(IBatisRoutingFact routeFact) { Validate.notNull(routeFact); return StringUtils.equals(getTypePattern(), routeFact.getAction()); }