Example usage for org.apache.shiro.util Assert state

List of usage examples for org.apache.shiro.util Assert state

Introduction

In this page you can find the example usage for org.apache.shiro.util Assert state.

Prototype

public static void state(boolean expression, String message) 

Source Link

Document

Assert a boolean expression, throwing IllegalStateException if the test result is false.

Usage

From source file:org.springframework.session.data.gemfire.config.annotation.web.http.AbstractGemFireHttpSessionConfiguration.java

License:Apache License

/**
 * Returns a reference to the Spring {@link ApplicationContext}.
 *
 * @return a reference to the Spring {@link ApplicationContext}.
 * @throws IllegalStateException if {@link ApplicationContext} is {@literal null}.
 * @see org.springframework.context.ApplicationContext
 *///from   w w w  .  j a v a 2  s.  c o m
protected ApplicationContext getApplicationContext() {

    Assert.state(this.applicationContext != null, "The ApplicationContext was not properly configured");

    return this.applicationContext;
}