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

@Deprecated
public static void notNull(@Nullable Object object) 

Source Link

Document

Assert that an object is not null .

Usage

From source file:org.arrow.test.WorkflowTestUtils.java

/**
 * Asserts whether all BPMN entities of the given {@link ProcessInstance}
 * has the state 'SUCCESS'./*from   ww  w .  j  a  va 2 s. c om*/
 * 
 * @param execRepo
 * @param pi
 */
public static void assertSuccessState(ExecutionRepository execRepo, ProcessInstance pi) {

    Set<Execution> executions = execRepo.findByProcessInstance(pi);
    Assert.notNull(executions);

    for (Execution execution : executions) {
        State state = execution.getState();
        Assert.isTrue(State.SUCCESS.compareTo(state) == 0);
    }
}

From source file:com.ewcms.publication.deploy.provider.LocalDeployOperatorTest.java

@Test
public void testGetTargtRoot() throws Exception {

    DeployOperatorable operator = new LocalDeployOperator.Builder("e:/tmp").build();
    LocalDeployOperator localOperator = (LocalDeployOperator) operator;

    FileObject target = localOperator.getRootFileObject();
    Assert.notNull(target);
    target.close();//from  w w  w.ja  va2s  . c o  m
}

From source file:edu.wisc.jmeter.HostStatus.java

public void setStatus(Status status) {
    Assert.notNull(status);
    this.status = status;
}

From source file:io.kahu.hawaii.service.sms.FakeSmsSender.java

public FakeSmsSender(LogManager logManager) {
    Assert.notNull(logManager);
    this.logManager = logManager;

    logManager.audit("Using FakeSmsSender");
}

From source file:com.zai360.portal.util.SpringUtils.java

/**
 * ?//  w ww.  j  a v  a2 s.  c o m
 * 
 * @param name
 *            Bean??
 * @param type
 *            Bean
 * @return 
 */
public static <T> T getBean(String name, Class<T> type) {
    Assert.hasText(name);
    Assert.notNull(type);
    return applicationContext.getBean(name, type);
}

From source file:com.ewcms.publication.freemarker.directive.out.DefaultDirectiveOut.java

@SuppressWarnings("rawtypes")
@Override//from   ww  w .  j  a v  a  2s .  co m
public Object loopValue(Object value, Environment env, Map params) throws TemplateModelException {
    Assert.notNull(value);
    return value;
}

From source file:de.olivergierke.whoops.core.Deal.java

/**
 * Creates a new {@link Deal} for the given {@link Instrument}.
 * //from  w w  w.  j  ava  2s  .  c om
 * @param instrument
 */
public Deal(Instrument instrument) {
    Assert.notNull(instrument);
    this.instrument = instrument;
}

From source file:io.kahu.hawaii.service.mail.FakeMailSender.java

public FakeMailSender(LogManager logManager) {
    Assert.notNull(logManager);
    this.logManager = logManager;
}