List of usage examples for java.lang NullPointerException NullPointerException
public NullPointerException(String s)
From source file:hd3gtv.mydmam.pathindexing.ImporterStorage.java
public ImporterStorage(String physical_storage_name, String pathindex_storage_name, long ttl) throws IOException, ParseException { super();//w w w . j a v a 2 s. com this.physical_storage_name = physical_storage_name; if (physical_storage_name == null) { throw new NullPointerException("\"storagename\" can't to be null"); } this.pathindex_storage_name = pathindex_storage_name; if (pathindex_storage_name == null) { throw new NullPointerException("\"poolname\" can't to be null"); } this.ttl = ttl; }
From source file:ae.config.field.AbstractCollectionField.java
AbstractCollectionField(final ActiveEntity ae, final String collectionElementClass) { super(ae);/*from ww w .j av a2s.com*/ if (collectionElementClass == null) { throw new NullPointerException("collectionElementClass"); } this.elementClass = collectionElementClass; }
From source file:gallery.web.validator.newPassword.NewPasswordBindValidator.java
public void init() { StringBuilder sb = new StringBuilder(); common.utils.MiscUtils.checkNotNull(user_service, "user_service", sb); if (sb.length() > 0) { throw new NullPointerException(sb.toString()); }// w w w . j a v a 2 s.co m }
From source file:net.ontopia.persistence.query.sql.SQLAnd.java
public SQLAnd(SQLExpressionIF[] expressions) { if (expressions == null) throw new NullPointerException("And expressions cannot be null."); this.expressions = expressions; }
From source file:org.atemsource.atem.impl.json.attribute.ObjectNodeAttribute.java
@Override public ObjectNode getValue(Object entity) { ObjectNode node = (ObjectNode) entity; if (node.isNull()) { throw new NullPointerException("entity is null"); } else {//w w w . j a v a2s . com JsonNode jsonNode = node.get(getCode()); if (jsonNode == null || jsonNode.isNull()) { return null; } else { return (ObjectNode) jsonNode; } } }
From source file:com.github.jinahya.codec.commons.StringEncoderProxy.java
/** * Creates a new proxy instance./*from www .ja v a 2s . co m*/ * * @param <P> proxy type parameter * @param <T> user encoder type parameter * @param proxyType proxy type * @param encoderType encoder type * @param encoder encoder * * @return a new proxy instance */ protected static <P extends AbstractEncoderProxy<T>, T> Object newInstance(final Class<P> proxyType, final Class<T> encoderType, final T encoder) { if (proxyType == null) { throw new NullPointerException("proxyType"); } if (!StringEncoderProxy.class.isAssignableFrom(proxyType)) { throw new IllegalArgumentException( "proxyType(" + proxyType + ") is not assignable to " + StringEncoderProxy.class); } return newInstance(ENCODER.getClassLoader(), new Class<?>[] { ENCODER }, proxyType, encoderType, encoder); }
From source file:fr.xebia.demo.ws.employee.EmployeeServiceImpl.java
@Override public void putEmployee(Holder<Employee> employee) throws EmployeeServiceFaultMsg { if (employee.value.getId() == null) { throw new NullPointerException("employee.id can NOT be null"); }//from w ww . j ava 2 s . c o m logger.info("putEmployee(" + employee + "): " + ToStringBuilder.reflectionToString(employee)); }
From source file:net.dv8tion.jda.core.managers.fields.Field.java
protected static void checkNull(Object obj, String name) { if (obj == null) throw new NullPointerException("Provided " + name + " was null!"); }
From source file:com.amazonaws.mturk.addon.HITDataWriter.java
public HITDataWriter(String fileName, String delim) throws IOException { super();/* w ww . ja va2 s . co m*/ if (fileName == null) { throw new NullPointerException("fileName is null."); } this.fileName = fileName; this.delim = delim; }
From source file:com.novation.eligibility.rest.spring.web.servlet.handler.RestError.java
public RestError(HttpStatus status, int code, String message, String developerMessage, String moreInfoUrl, Throwable throwable) {//from w w w . j a va 2s .com if (status == null) { throw new NullPointerException("HttpStatus argument cannot be null."); } this.status = status; this.code = code; this.message = message; this.developerMessage = developerMessage; this.moreInfoUrl = moreInfoUrl; this.throwable = throwable; }