Example usage for java.lang NullPointerException NullPointerException

List of usage examples for java.lang NullPointerException NullPointerException

Introduction

In this page you can find the example usage for java.lang NullPointerException NullPointerException.

Prototype

public NullPointerException(String s) 

Source Link

Document

Constructs a NullPointerException with the specified detail message.

Usage

From source file:edu.cornell.mannlib.vitro.webapp.config.ConfigurationProperties.java

public static ConfigurationProperties getBean(HttpServlet servlet) {
    if (servlet == null) {
        throw new NullPointerException("servlet may not be null.");
    }/*from w  ww .  j a v  a 2s. c  o m*/
    return getBean(servlet.getServletContext());
}

From source file:fr.univlorraine.mondossierweb.utils.PropertyUtils.java

/** Retourne l'index elasticSearch */
public static String getElasticSearchIndex() {
    String value = System.getProperty("context.param.elasticsearch.index");
    if (!StringUtils.hasText(value))
        throw new NullPointerException("param.elasticsearch.index cannot be null !");
    return value;
}

From source file:org.n52.io.geojson.old.GeojsonCrs.java

public static GeojsonCrs createNamedCRS(String name) {
    if (name == null) {
        throw new NullPointerException("Argument 'name' must not be null.");
    }/*from w  ww . j  a v  a2 s  . c om*/
    GeojsonCrs namedCrs = new GeojsonCrs();
    namedCrs.addProperty("name", name);
    namedCrs.setType(TYPE_NAME);
    return namedCrs;
}

From source file:com.jxt.web.filter.AcceptUrlFilter.java

public AcceptUrlFilter(String urlPattern) {
    if (urlPattern == null) {
        throw new NullPointerException("urlPattern must not be null");
    }//from   w w  w  .  j  av a2 s  .  co  m
    // TODO remove decode
    this.urlPattern = new String(Base64.decodeBase64(urlPattern), UTF8);
}

From source file:at.molindo.notify.model.BeanParams.java

public BeanParams(B bean) {
    if (bean == null) {
        throw new NullPointerException("bean");
    }
    _bean = bean;

}

From source file:common.cms.controller.LocalizedCmsDelegate.java

@Override
public void init() {
    super.init();
    StringBuilder sb = new StringBuilder();
    common.utils.MiscUtils.checkNotNull(service, "service", sb);
    if (sb.length() > 0) {
        throw new NullPointerException(sb.toString());
    }/*  ww  w  .j  a  v  a2  s. c  om*/
}

From source file:hd3gtv.mydmam.pathindexing.ImporterCDFinder.java

public ImporterCDFinder(File filetoimport, String poolname) throws IOException, ParseException {
    super();//from   www  . j  av  a2 s  .com
    this.filetoimport = filetoimport;
    if (filetoimport == null) {
        throw new NullPointerException("\"filetoimport\" can't to be null");
    }
    if (filetoimport.exists() == false) {
        throw new FileNotFoundException(filetoimport.getPath());
    }
    this.poolname = poolname;
}

From source file:com.cloudera.sqoop.orm.TableClassName.java

public TableClassName(final SqoopOptions opts) {
    if (null == opts) {
        throw new NullPointerException("Cannot instantiate a TableClassName on null options.");
    } else {/*www  .j a v  a2s .co m*/
        this.options = opts;
    }
}

From source file:com.gistlabs.mechanize.document.json.node.impl.ObjectNodeImpl.java

public ObjectNodeImpl(final JsonNode parent, final String name, final JSONObject obj) {
    super(parent, name);
    if (obj == null)
        throw new NullPointerException("JSONObject can't be null");
    this.obj = obj;
}

From source file:com.github.dozermapper.core.converters.CustomConverterContainer.java

public void setConverters(List<CustomConverterDescription> converters) {
    if (converters == null) {
        throw new NullPointerException("Converters can not be null!");
    }//from   w w w . j  ava2  s. c  o m
    this.converters = converters;
}