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.synyx.hades.domain.auditing.AuditorAwareStub.java

public AuditorAwareStub(AuditableUserDao userDao) {

    Assert.notNull(userDao);
    this.userDao = userDao;
}

From source file:org.mule.modules.automation.testcases.GetProjectIssuesTestCases.java

@Category({ RegressionTests.class, SmokeTests.class })
@Test//from ww w  .  j a v a2 s  .  co  m
public void testGetProjectIssues() throws Exception {
    Collection<Issue> issues = runFlowAndGetPayload("get-project-issues");
    Assert.notNull(issues);
    Assert.notEmpty(issues);
}

From source file:net.paslavsky.springrest.CacheableAnnotationPreprocessor.java

public CacheableAnnotationPreprocessor(AnnotationPreprocessor delegate) {
    Assert.notNull(delegate);
    this.delegate = delegate;
    cache = new HashMap<Method, RestMethodMetadata>();
}

From source file:net.shopxx.util.JsonUtil.java

/**
 * JSON?//w  w w .j a va 2 s  . co  m
 * @param json JSON
 * @param valueType 
 */
public static <T> T toObject(String json, Class<T> valueType) {
    Assert.notNull(json);
    Assert.notNull(valueType);
    try {
        return mapper.readValue(json, valueType);
    } catch (Exception e) {
        e.printStackTrace();
    }
    return null;
}

From source file:es.us.isa.ideas.app.controllers.AbstractController.java

@ExceptionHandler(Throwable.class)
public ModelAndView panic(Throwable oops) {
    Assert.notNull(oops);

    ModelAndView result;/* w  w w  . j a  v  a 2s. co m*/

    result = new ModelAndView("misc/panic");
    result.addObject("name", ClassUtils.getShortName(oops.getClass()));
    result.addObject("message", oops.getMessage());
    result.addObject("message_type", "message.type.error");
    result.addObject("exception", oops);

    return result;
}

From source file:com.audi.interview.booking.service.VehicleService.java

public Vehicle findOne(Long id) {
    Assert.notNull(id);
    return vehicleRepository.findOne(id);
}

From source file:de.olivergierke.whoops.web.customer.CustomerController.java

@Autowired
public CustomerController(CustomerService customerService) {
    Assert.notNull(customerService);
    this.customerService = customerService;
}

From source file:net.eusashead.spring.gaecache.DefaultArgumentHashStrategy.java

@Override
public ArgumentHash hash(Object keySource) {
    Assert.notNull(keySource);
    return new ArgumentHash(keySource.toString());
}

From source file:org.arrow.data.neo4j.query.cypher.close.SimpleClose.java

public SimpleClose(String cypher) {
    Assert.notNull(cypher);

    cypher = StringUtils.replace(cypher, "return", "");
    cypher = StringUtils.trimWhitespace(cypher);

    this.cypher = cypher;
}

From source file:org.arrow.data.neo4j.query.cypher.match.SimpleMatch.java

public SimpleMatch(String cypher) {
    Assert.notNull(cypher);

    cypher = StringUtils.replace(cypher, "match", "");
    cypher = StringUtils.trimWhitespace(cypher);

    this.cypher = cypher;
}