Example usage for org.springframework.util Assert notNull

List of usage examples for org.springframework.util Assert notNull

Introduction

In this page you can find the example usage for org.springframework.util Assert notNull.

Prototype

public static void notNull(@Nullable Object object, Supplier<String> messageSupplier) 

Source Link

Document

Assert that an object is not null .

Usage

From source file:org.cloudfoundry.tools.io.zip.ZipArchive.java

/**
 * Unzip the specified zip file into a folder.
 * /*from  w  w w . j ava  2s.  co  m*/
 * @param file the file to unzip (this must reference a zip file)
 * @param destination the destination folder
 * @see #unpack(InputStream, Folder)
 */
public static void unpack(File file, Folder destination) {
    Assert.notNull(file, "File must not be null");
    Assert.notNull(destination, "Destination must not be null");
    unpack(file.getContent().asInputStream(), destination);
}

From source file:com.azaptree.services.domain.entity.impl.DomainEntity.java

public DomainEntity(final Entity entity) {
    Assert.notNull(entity, "entity is required");
    setEntityId(entity.getEntityId());
}

From source file:com.frank.search.solr.core.query.StatsOptions.java

/**
 * Adds a field to the statistics to be requested.
 * /* w w w.  jav  a2s. co  m*/
 * @param field
 * @return
 */
public FieldStatsOptions addField(Field field) {

    Assert.notNull(field, "Field for statistics must not be 'null'.");

    state.fields.add(field);
    return new FieldStatsOptions(field, state);
}

From source file:io.curly.artifact.integration.event.CreatedArtifactEventHandler.java

@Autowired
public CreatedArtifactEventHandler(List<EventEmitter<Artifact>> eventEmitters) {
    Assert.notNull(eventEmitters, "EventEmitters, must be not null!");
    this.eventEmitters = eventEmitters;
}

From source file:org.jdbcluster.clustertype.ClusterTypeFactory.java

static public <T extends ClusterType> T newInstance(Class<? extends ICluster> clazz)
        throws ClusterTypeException {

    Assert.notNull(clazz, "Class  may not be null");

    String ct = ClusterTypeBase.getClusterTypeConfig().getClusterTypeFromClass(clazz.getName());
    return newInstance(ct);
}

From source file:io.dyn.core.fsm.StateMachine.java

public StateMachine(List<String> states) {
    Assert.notNull(states, "States cannot be null");
    this.states = states;
    this.cursor = states.listIterator();
}

From source file:fr.mby.opa.picsimpl.service.BasicProposalManager.java

@Override
public void selectBranch(final long albumId, final ProposalBranch branch, final HttpServletRequest request) {
    Assert.notNull(branch, "No ProposalBranch supplied !");
    Assert.notNull(request, "No HttpServletRequest supplied !");

    request.getSession().setAttribute(BasicProposalManager.SELECTED_BRANCH_ID + albumId, branch);
}

From source file:com.codeabovelab.dm.gateway.proxy.common.HttpProxyContext.java

public HttpProxyContext(HttpServletRequest request, HttpServletResponse response, URI target, String uid) {
    this.request = request;
    Assert.notNull(request, "request is null");
    this.response = response;
    Assert.notNull(response, "response is null");
    this.target = target;
    Assert.notNull(target, "target is null");
    this.targetHost = new HttpHost(target.getHost(), target.getPort(), target.getScheme());
    this.uid = uid;

}

From source file:com.flipkart.aesop.processor.kafka.config.KafkaConfig.java

public void afterPropertiesSet() throws Exception {
    /* Assert if filename is ot empty */
    Assert.notNull(this.config, "'KafkaConfig' cannot be null. This Databus Client will not be initialized");
}